天天看點

electron-vew在資料總管中顯示檔案和直接打開檔案

想要在electron 打開資料總管顯示要打開的檔案如上圖所示

electron-vew在資料總管中顯示檔案和直接打開檔案

代碼如下:

import { shell } from 'electron'
shell.showItemInFolder(path);
           

想要在使用裝置的預設方式打開檔案,代碼如下

import { shell } from 'electron'
shell.openItem(path);
           

繼續閱讀