Plugin API
繁體中文
繁體中文
  • 入門
    • 簡介
    • 你的第一個插件
    • 檔案結構概述
    • 插件類型
      • 視窗
      • 背景服務
      • 格式擴充
      • 檢查器
    • 除錯插件
  • 部署
    • 準備插件
    • 打包插件
    • 發佈插件
    • 更新插件
    • 開發者政策
    • 插件圖示樣板
  • 開發指南
    • manifest.json 完整設定
    • 取得數據
    • 修改數據
    • 存取本機檔案
    • 發出網路請求
    • 使用 Node.js 原生 API
    • 使用第三方模快
    • 多國語言(i18n)
    • 無邊框視窗
  • API 參考
    • event(事件)
    • item(項目)
    • folder(資料夾)
    • tag(標籤)
    • tagGroup(標籤群組)
    • library(資源庫)
    • window(視窗)
    • app(應用)
    • os(作業系統)
    • screen(螢幕)
    • notification(通知)
    • contextMenu(右鍵選單)
    • dialog(對話框)
    • clipboard(剪貼板)
    • drag(拖曳檔案)
    • shell(殼)
    • log(日誌)
  • 额外组件
    • FFmpeg
Powered by GitBook
On this page
  • beep()
  • openExternal(url)
  • openPath(path)
  • showItemInFolder(path)
  1. API 參考

shell(殼)

使用預設應用程式管理檔案和 URL。

shell 模組提供與桌面整合相關的功能。


方法

beep()

播放系統嗶嗶的提示聲音。

  • 返回 Promise<void>

await eagle.shell.beep();

openExternal(url)

使用系統預設方式開啓指定 URL。注意:如果系統沒有設定預設應用,此功能將不會有任何反應。

  • url string - 欲開啓之URL

  • 返回 Promise<void>

await eagle.shell.openExternal('https://www.google.com/');

openPath(path)

使用系統預設方式開啓指定路徑。

  • path string - 欲開啓檔案路徑

  • 返回 Promise<void>

await eagle.shell.openPath('path_to_file');

showItemInFolder(path)

在檔案管理器中顯示指定的檔案、資料夾。

  • path string - 欲顯示指定的檔案、資料夾

  • 返回 Promise<void>

await eagle.shell.showItemInFolder('path_to_file_or_directory');

Previousdrag(拖曳檔案)Nextlog(日誌)

Last updated 2 years ago