Merge pull request #7182 from electron/shell-return-values

Return booleans from more shell APIs
This commit is contained in:
Cheng Zhao 2016-09-13 16:46:05 +09:00 committed by GitHub
commit b13bab6fae
5 changed files with 57 additions and 53 deletions

View file

@ -20,13 +20,15 @@ The `shell` module has the following methods:
* `fullPath` String
Show the given file in a file manager. If possible, select the file.
Show the given file in a file manager. If possible, select the file. Returns
true if the item was successfully shown, false otherwise.
### `shell.openItem(fullPath)`
* `fullPath` String
Open the given file in the desktop's default manner.
Open the given file in the desktop's default manner. Returns true if the item
was successfully opened, false otherwise.
### `shell.openExternal(url[, options])`
@ -44,6 +46,7 @@ application was available to open the URL, false otherwise.
* `fullPath` String
Move the given file to trash and returns a boolean status for the operation.
Returns true if the item was successfully moved to the trash, false otherwise.
### `shell.beep()`