feat: convert shell.openItem to async shell.openPath (#20682)

This commit is contained in:
Shelley Vohr 2019-11-07 23:08:43 -08:00 committed by GitHub
parent fd70ac1173
commit d3622f9c37
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 121 additions and 58 deletions

View file

@ -24,11 +24,14 @@ The `shell` module has the following methods:
Show the given file in a file manager. If possible, select the file.
### `shell.openItem(fullPath)`
### `shell.openPath(path)`
* `fullPath` String
* `path` String
Returns `Boolean` - Whether the item was successfully opened.
Returns `Promise<Object>` - Resolve with an object containing the following:
* `success` Boolean - whether or not the path was successfully opened in the desktop's default manner.
* `errorMessage` String (optional) - The error message corresponding to the failure if a failure occurred, otherwise empty string.
Open the given file in the desktop's default manner.