show: bindings.dockShow
setMenu: bindings.dockSetMenu
+appPath = null
+app.setAppPath = (path) ->
+ appPath = path
+
+app.getAppPath = ->
+ appPath
+
# Be compatible with old API.
app.once 'ready', -> @emit 'finish-launching'
app.terminate = app.quit
app.setName(packageJson.name);
app.setPath('userData', path.join(app.getPath('appData'), app.getName()));
app.setPath('userCache', path.join(app.getPath('cache'), app.getName()));
+ app.setAppPath(packagePath);
}
// Run the app.
# Set the user path according to application's name.
app.setPath 'userData', path.join(app.getPath('appData'), app.getName())
app.setPath 'userCache', path.join(app.getPath('cache'), app.getName())
+app.setAppPath packagePath
# Load the chrome extension support.
require './chrome-extension'
executed. It is possible that a window cancels the quitting by returning
`false` in `beforeunload` handler.
+## app.getAppPath()
+
+Returns the current application directory.
+
## app.getPath(name)
* `name` String