Figure out the user's home directory if $HOME is not set
This commit is contained in:
parent
eba840c8a1
commit
465cb68244
8 changed files with 84 additions and 36 deletions
|
@ -110,6 +110,9 @@ void deletePath(const Path & path, unsigned long long & bytesFreed);
|
|||
Path createTempDir(const Path & tmpRoot = "", const Path & prefix = "nix",
|
||||
bool includePid = true, bool useGlobalCounter = true, mode_t mode = 0755);
|
||||
|
||||
/* Return $HOME or the user's home directory from /etc/passwd. */
|
||||
Path getHome();
|
||||
|
||||
/* Return $XDG_CACHE_HOME or $HOME/.cache. */
|
||||
Path getCacheDir();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue