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(unix)]
use pathman::{UpdateType, append_to_path};

fn main() {
    #[cfg(unix)]
    match append_to_path("/home/user/test/appended", Some("Managed by Pathman")) {
        Ok(update_type) => match update_type {
            UpdateType::Success => println!("Success"),
            UpdateType::AlreadyInPath => println!("Already in Path"),
        },
        Err(e) => println!("Error: {e}"),
    }
}