return brightray::DIR_APP_DATA;
else if (name == "userData")
return brightray::DIR_USER_DATA;
+ else if (name == "home")
+ return base::DIR_HOME;
else
return -1;
}
app = bindings.app
app.__proto__ = EventEmitter.prototype
-app.getHomeDir = ->
- process.env[if process.platform is 'win32' then 'USERPROFILE' else 'HOME']
-
-app.getDataPath = ->
- app.getPath 'userData'
-
-app.setDataPath = (path) ->
- app.setPath 'userData', path
-
app.setApplicationMenu = (menu) ->
require('menu').setApplicationMenu menu
app.once 'ready', -> app.emit 'finish-launching'
app.terminate = app.quit
app.exit = process.exit
+app.getHomeDir = -> app.getPath 'home'
+app.getDataPath = -> app.getPath 'userData'
+app.setDataPath = (path) -> app.setPath 'userData', path
# Only one App object pemitted.
module.exports = app