Crate globenv

Source
Expand description

§globenv

Globally set & read environment variables and paths on Windows, macOS or Linux

§Example:

use globenv::*;
// Environment Variables
get_var("key").unwrap().unwrap();
set_var("key", "value").unwrap();
remove_var("key").unwrap();
// Environment Paths
get_paths().unwrap();
set_path("example/path").unwrap();
remove_path("example/path").unwrap();

Made with <3 by Dervex, based on globalenv by Nicolas BAUW

Enums§

EnvError

Functions§

get_paths
Gets all environment paths from the current process.
get_var
Gets the environment variable from the current process or global environment.
remove_path
Removes the environment path globally and from the current process.
remove_var
Removes the environment variable globally and from the current process.
set_path
Adds a environment path globally and in the current process.
set_var
Sets a environment variable globally and in the current process.