feat: convert shell.openItem to async shell.openPath (#20682)
This commit is contained in:
parent
fd70ac1173
commit
d3622f9c37
8 changed files with 121 additions and 58 deletions
|
@ -1056,9 +1056,12 @@ app.on('ready', () => {
|
|||
// https://github.com/atom/electron/blob/master/docs/api/shell.md
|
||||
|
||||
shell.showItemInFolder('/home/user/Desktop/test.txt')
|
||||
shell.openItem('/home/user/Desktop/test.txt')
|
||||
shell.moveItemToTrash('/home/user/Desktop/test.txt')
|
||||
|
||||
shell.openPath('/home/user/Desktop/test.txt').then(err => {
|
||||
if (err) console.log(err)
|
||||
})
|
||||
|
||||
shell.openExternal('https://github.com', {
|
||||
activate: false
|
||||
}).then(() => {})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue