Implement moveToApplicationsFolder (#10142)

* Implement moveToApplicationsFolder

* Fix tabs / spaces

* Fix linting

* Use Browser::Quit, instead of exit

* Update documentation as per feedback

* Fix spec
This commit is contained in:
Samuel Attard 2017-09-01 00:37:12 +10:00 committed by John Kleinschmidt
parent 14eea98566
commit 6b010614e2
7 changed files with 440 additions and 0 deletions

View file

@ -927,6 +927,26 @@ Enables mixed sandbox mode on the app.
This method can only be called before app is ready.
### `app.isInApplicationsFolder()` _macOS_
Returns `Boolean` - Whether the application is currently running from the
systems Application folder. Use in combination with `app.moveToApplicationsFolder()`
### `app.moveToApplicationsFolder()` _macOS_
Returns `Boolean` - Whether the move was successful. Please note that if
the move is successful your application will quit and relaunch.
No confirmation dialog will be presented by default, if you wish to allow
the user to confirm the operation you may do so using the
[`dialog`](dialog.md) API.
**NOTE:** This method throws errors if anything other than the user causes the
move to fail. For instance if the user cancels the authorization dialog this
method returns false. If we fail to perform the copy then this method will
throw an error. The message in the error should be informative and tell
you exactly what went wrong
### `app.dock.bounce([type])` _macOS_
* `type` String (optional) - Can be `critical` or `informational`. The default is