当前位置:K88软件开发文章中心编程工具Electron → 文章内容

Electron shell 模块

减小字体 增大字体 作者:佚名  来源:网上搜集  发布时间:2019-1-24 10:21:33

由 Loen 创建, 最后一次修改 2016-10-08 shell 模块提供了集成其他桌面客户端的关联功能.在用户默认浏览器中打开URL的示例:var shell = require('shell');shell.openExternal('https://github.com');Methodsshell 模块包含以下函数: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 shell 模块