Add a few more paths for app.getPath
This commit is contained in:
parent
8aa5b97c61
commit
4604c9bb0e
2 changed files with 14 additions and 2 deletions
|
@ -73,6 +73,14 @@ int GetPathConstant(const std::string& name) {
|
|||
return brightray::DIR_USER_CACHE;
|
||||
else if (name == "home")
|
||||
return base::DIR_HOME;
|
||||
else if (name == "temp")
|
||||
return base::DIR_TEMP;
|
||||
else if (name == "userDesktop")
|
||||
return base::DIR_USER_DESKTOP;
|
||||
else if (name == "exe")
|
||||
return base::FILE_EXE;
|
||||
else if (name == "module")
|
||||
return base::FILE_MODULE;
|
||||
else
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -106,13 +106,17 @@ You can request following paths by the names:
|
|||
* `$XDG_CONFIG_HOME` or `~/.config` on Linux
|
||||
* `~/Library/Application Support` on OS X
|
||||
* `userData`: The directory for storing your app's configuration files, by
|
||||
default it is the `appData` directory appended with your app's name.
|
||||
default it is the `appData` directory appended with your app's name
|
||||
* `cache`: Per-user application cache directory, by default it is pointed to:
|
||||
* `%APPDATA%` on Window, which doesn't has a universal place for cache
|
||||
* `$XDG_CACHE_HOME` or `~/.cache` on Linux
|
||||
* `~/Library/Caches` on OS X
|
||||
* `userCache`: The directory for placing your app's caches, by default it is the
|
||||
`cache` directory appended with your app's name.
|
||||
`cache` directory appended with your app's name
|
||||
* `temp`: Temporary directory
|
||||
* `userDesktop`: The current user's Desktop directory
|
||||
* `exe`: The current executable file
|
||||
* `module`: The `libchromiumcontent` library
|
||||
|
||||
## app.setPath(name, path)
|
||||
|
||||
|
|
Loading…
Reference in a new issue