]> khamidou — GitHub mirrors - electron.git/commitdiff
Added the getDataPath function to the app api docs
authorCorné Dorrestijn <contact@corne.info>
Fri, 15 Aug 2014 15:29:36 +0000 (17:29 +0200)
committerCorné Dorrestijn <contact@corne.info>
Fri, 15 Aug 2014 15:29:36 +0000 (17:29 +0200)
docs/api/app.md

index 7a6488556ed21fa142aac782474356817a8189ba..2c1288a4266b87f4573f1d8dd6c1ff7596f2aafa 100644 (file)
@@ -87,6 +87,15 @@ executed. It is possible that a window cancels the quitting by returning
 Quit the application directly, it will not try to close all windows so cleanup
 code will not run.
 
+## app.getDataPath()
+
+Returns the right data path for the OS appended with the app name.
+
+ * `%APPDATA%\My App Name` (`C:\Users\[username]\AppData\Roaming\My App Name`)
+   in Windows
+ * `~/.config/My App Name` in Linux
+ * `/Users/[username]/Library/Application Support/My App Name` in OS X
+
 ## app.getVersion()
 
 Returns the version of loaded application, if no version is found in