Electron shell 模块


本文整理自网络,侵删。

shell 模块提供了集成其他桌面客户端的关联功能.

在用户默认浏览器中打开URL的示例:

var shell = require('shell');

shell.openExternal('https://github.com');

Methods

shell 模块包含以下函数:

shell.showItemInFolder(fullPath)

  • fullPath String

打开文件所在文件夹,一般情况下还会选中它.

shell.openItem(fullPath)

  • fullPath String

以默认打开方式打开文件.

shell.openExternal(url)

  • url String

以系统默认设置打开外部协议.(例如,mailto: somebody@somewhere.io会打开用户默认的邮件客户端)

shell.moveItemToTrash(fullPath)

  • fullPath String

删除指定路径文件,并返回此操作的状态值(boolean类型).

shell.beep()

播放 beep 声音.


标签:Electron

相关阅读 >>

Electron contenttracing 模块

Electron 向mac app store 应用提交向导

Electron 构建步骤 (linux)

Electron 编码规范

Electron webcontents 模块

Electron 构建步骤 (os x)

Electron 支持的 chrome 命令行开关

Electron 构建步骤 (windows)

Electron protocol 模块

Electron 快速入门

更多相关阅读请进入《Electron》频道 >>




打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...