#include "types.hh"
#include <sys/types.h>
Go to the source code of this file.
◆ createNixStateDir()
Path nix::createNixStateDir |
( |
| ) |
|
Create the Nix state directory and return the path to it.
◆ expandTilde()
std::string nix::expandTilde |
( |
std::string_view | path | ) |
|
Perform tilde expansion on a path, replacing tilde with the user's home directory.
◆ getCacheDir()
Path nix::getCacheDir |
( |
| ) |
|
- Returns
- $NIX_CACHE_HOME or $XDG_CACHE_HOME/nix or $HOME/.cache/nix.
◆ getConfigDir()
Path nix::getConfigDir |
( |
| ) |
|
- Returns
- $NIX_CONFIG_HOME or $XDG_CONFIG_HOME/nix or $HOME/.config/nix.
◆ getConfigDirs()
std::vector< Path > nix::getConfigDirs |
( |
| ) |
|
- Returns
- the directories to search for user configuration files
◆ getDataDir()
- Returns
- $NIX_DATA_HOME or $XDG_DATA_HOME/nix or $HOME/.local/share/nix.
◆ getHome()
- Returns
- $HOME or the user's home directory from /etc/passwd.
◆ getHomeOf()
Path nix::getHomeOf |
( |
uid_t | userId | ) |
|
- Returns
- the given user's home directory from /etc/passwd.
◆ getStateDir()
Path nix::getStateDir |
( |
| ) |
|
- Returns
- $NIX_STATE_HOME or $XDG_STATE_HOME/nix or $HOME/.local/state/nix.
◆ isRootUser()
Is the current user UID 0 on Unix?
Currently always false on Windows, but that may change.