simple-home-dir 0.1.5

An extremely small and simple library purposed to retrieve the user's home directory.
Documentation
simple-home-dir-0.1.5 has been yanked.

simple-home-dir

Crate

An extremely small and optimized library purposed to retrieve the user's home directory.

How to Use:

use simple_home_dir::*;

fn main() {
    // "/home/<USER>"
    let path = home_dir().unwrap();
}

And that's it!

use simple_home_dir::expand_tilde;

fn main() {
    // "/home/<USER>/.local"
    let expanded = simple_home_dir::expand_tilde("~/.local").unwrap();
}

There's also the expand_tilde feature (disabled by default) which can expand upon the tilde from a given path.

Credit

The majority of the Windows portion of this has been noted from the windows-sys and directories crates.