Electron shell 模块

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

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

var shell = require('shell');
shell.openExternal('https://jb51.cc');

Methods

shell 模块包含以下函数:

shell.showItemInFolder(fullPath)

  • fullPath String

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

shell.openItem(fullPath)

  • fullPath String

认打开方式打开文件.

shell.openExternal(url)

  • url String

以系统认设置打开外部协议.(例如,mailto: [email protected]会打开用户认的邮件客户端)

shell.moveItemToTrash(fullPath)

  • fullPath String

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

shell.beep()

播放 beep 声音.

版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 [email protected] 举报,一经查实,本站将立刻删除。

相关推荐