pathman 0.1.2

A cross-platform library for managing the PATH environment variable.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
#[cfg(windows)]
use pathman::{UpdateType, append_to_path};

fn main() {
    #[cfg(windows)]
    match append_to_path("C:\\test\\appended", None) {
        Ok(update_type) => match update_type {
            UpdateType::Success => println!("Success"),
            UpdateType::AlreadyInPath => println!("Already in Path"),
        },
        Err(e) => println!("Error: {e}"),
    }
}