Module std::env
[−]
[src]
Inspection and manipulation of the process's environment.
This module contains methods to inspect various aspects such as environment variables, process arguments, the current directory, and various other important directories.
Modules
consts |
Constants associated with the current target |
Structs
Args |
An iterator over the arguments of a process, yielding a |
ArgsOs |
An iterator over the arguments of a process, yielding an |
JoinPathsError |
Error type returned from |
SplitPaths |
An iterator over |
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. |
Enums
VarError |
Possible errors from the |
Functions
args |
Returns the arguments which this program was started with (normally passed via the command line). |
args_os |
Returns the arguments which this program was started with (normally passed via the command line). |
current_dir |
Returns the current working directory as a |
current_exe |
Returns the filesystem path to the current executable which is running but with the executable name. |
home_dir |
Returns the path to the current user's home directory if known. |
join_paths |
Joins a collection of |
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, returning whether the change was completed successfully or not. |
set_var |
Sets the environment variable |
split_paths |
Parses input according to platform conventions for the |
temp_dir |
Returns the path to a temporary directory. |
var |
Fetches the environment variable |
var_os |
Fetches the environment variable |
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. |