shell API 列表
本模块包含 7 个 API。
Methods(方法)
| API | 说明 | 鸿蒙支持 |
|---|---|---|
| shell.showItemInFolder(fullPath) | 在文件管理器中显示指定文件,若可能则选中该文件。 | 支持 |
| shell.openPath(path) | 返回 Promise,若打开失败则 resolve 为对应的错误信息字符串,成功则为空字符串。 | 支持 |
| shell.openExternal(url[, options]) | 返回 Promise,使用系统默认方式打开外部 URL,默认不激活窗口焦点。 | 支持 |
| shell.trashItem(path) | 返回 Promise,在文件移入回收站操作完成后 resolve。 | 不支持 |
| shell.beep() | 播放系统提示音。 | 支持 |
| shell.writeShortcutLink(shortcutPath[, operation], options) | 返回 boolean,表示快捷方式是否创建成功。 | 不支持 |
| shell.readShortcutLink(shortcutPath) | 返回 ShortcutDetails,读取指定路径快捷方式的详细信息。 | 不支持 |