加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 百科 > 正文

Electron shell 模块

发布时间:2020-12-16 08:31:28 所属栏目:百科 来源:网络整理
导读:shell模块提供了集成其他桌面客户端的关联功能. 在用户默认浏览器中打开URL的示例: varshell=require(shell);shell.openExternal(https://jb51.cc); Methods shell模块包含以下函数: shell.showItemInFolder(fullPath) fullPathString 打开文件所在文件夹,一

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

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

var shell = require('shell');
shell.openExternal('https://52php.cn');

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 声音.


(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读