A minimal, fast, and reliable crate dedicated to retrieving the user's home directory.
use simple_home_dir::*;
fn main() {
// Windows => C:\Users\jdoe
// Linux => /home/jdoe
// Mac => /Users/jdoe
let path = home_dir().unwrap();
}
The expand_tilde
feature is available here.
The dirs crate is relied upon to ensure that the functions of this crate are working properly.
The majority of the Windows portion has been noted from the windows-sys and directories crates.