Skip to main contentModule env
Source - consts
- Constants associated with the current target
- Args
- An iterator over the arguments of a process, yielding a
String value for
each argument. - ArgsOs
- An iterator over the arguments of a process, yielding an
OsString value
for each argument. - InvokingUser
- The account a root supervisor acts on behalf of, recorded explicitly with
supervisor run --invoking-user <user>. - JoinPathsError
- The error type for operations on the
PATH variable. Possibly returned from
env::join_paths(). - SplitPaths
- An iterator that splits an environment variable into paths according to
platform-specific conventions.
- Vars
- An iterator over a snapshot of the environment variables of this process.
- VarsOs
- An iterator over a snapshot of the environment variables of this process.
- VarError
- The error type for operations interacting with environment variables.
Possibly returned from
env::var().
- INVOKING_USER_FLAG
- Flag that records, in a system boot registration, the user who installed it
through sudo. See
InvokingUser.
- CWD
- HOME_DIR
- INVOKING_USER
- The recorded invoking user of this process, when it is a root
supervisor run --invoking-user <user>. - IPC_SOCK_DIR
- IPC_SOCK_MAIN
- ORIGINAL_PATH
- PITCHFORK_BIN
- PITCHFORK_CONFIG_DIR
- PITCHFORK_GLOBAL_CONFIG_SYSTEM
- PITCHFORK_GLOBAL_CONFIG_USER
- PITCHFORK_HOSTS_FILE
- Path to the hosts file managed by the proxy’s hosts sync.
- PITCHFORK_LOG
- PITCHFORK_LOGS_DIR
- PITCHFORK_LOG_FILE
- PITCHFORK_LOG_FILE_LEVEL
- PITCHFORK_STATE_DIR
- PITCHFORK_STATE_FILE
- args
- Returns the arguments that this program was started with (normally passed
via the command line).
- args_os
- Returns the arguments that this program was started with (normally passed
via the command line).
- boot_service_invoking_user
- The user a system boot registration should record, if any.
- current_dir
- Returns the current working directory as a
PathBuf. - current_exe
- Returns the full filesystem path of the current running executable.
- expand_tilde
- Expand a leading
~ path component to the current Pitchfork user’s home. - expand_tilde_for_user
- Expand a leading
~ to the home directory of user. - home_dir
- Returns the path of the current user’s home directory if known.
- invoking_user_arg
- Extract the value of
--invoking-user from a supervisor run command line. - invoking_user_ids
- UID and GID of the user a root supervisor acts on behalf of: the recorded
invoking user, else
SUDO_UID/SUDO_GID. - join_paths
- Joins a collection of
Paths appropriately for the PATH
environment variable. - remove_var⚠
- Removes an environment variable from the environment of the currently running process.
- set_current_dir
- Changes the current working directory to the specified path.
- set_var⚠
- Sets the environment variable
key to the value value for the currently running
process. - split_paths
- Parses input according to platform conventions for the
PATH
environment variable. - temp_dir
- Returns the path of a temporary directory.
- var
- Fetches the environment variable
key from the current process. - var_os
- Fetches the environment variable
key from the current process, returning
None if the variable isn’t set or if there is another error. - vars
- Returns an iterator of (variable, value) pairs of strings, for all the
environment variables of the current process.
- vars_os
- Returns an iterator of (variable, value) pairs of OS strings, for all the
environment variables of the current process.