diff options
author | Juan José Arboleda <soyjuanarbol@gmail.com> | 2019-06-23 22:28:12 -0500 |
---|---|---|
committer | Rich Trott <rtrott@gmail.com> | 2019-07-17 21:48:40 -0700 |
commit | d1bb21fc2c00650ac86a0de688c5583f8335c37b (patch) | |
tree | baf2e25e962d7feb12b3ee179e003cfd39237469 /doc/api/os.md | |
parent | 3ad87994ecfa177e19e6719bf0c6549de580623d (diff) | |
download | android-node-v8-d1bb21fc2c00650ac86a0de688c5583f8335c37b.tar.gz android-node-v8-d1bb21fc2c00650ac86a0de688c5583f8335c37b.tar.bz2 android-node-v8-d1bb21fc2c00650ac86a0de688c5583f8335c37b.zip |
doc: improve os.homedir() docs
PR-URL: https://github.com/nodejs/node/pull/28401
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'doc/api/os.md')
-rw-r--r-- | doc/api/os.md | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/doc/api/os.md b/doc/api/os.md index 80c97e84af..acd37e6a6f 100644 --- a/doc/api/os.md +++ b/doc/api/os.md @@ -215,6 +215,14 @@ added: v2.3.0 The `os.homedir()` method returns the home directory of the current user as a string. +**POSIX**: +Will use the `$HOME` environment variable if defined. Otherwise, it will use +the [effective UID][EUID] to look up the user's home directory. + +**Windows**: +Will use the `USERPROFILE` environment variable if defined. Otherwise it +will be the path to the profile directory of the current user. + ## os.hostname() <!-- YAML added: v0.3.3 @@ -1319,4 +1327,5 @@ The following process scheduling constants are exported by [`process.arch`]: process.html#process_process_arch [`process.platform`]: process.html#process_process_platform [Android building]: https://github.com/nodejs/node/blob/master/BUILDING.md#androidandroid-based-devices-eg-firefox-os +[EUID]: https://en.wikipedia.org/wiki/User_identifier#Effective_user_ID [uname(3)]: https://linux.die.net/man/3/uname |