An extremely small and optimized library purposed to retrieve the user's home directory.
```rust use simplehomedir::*;
fn main() {
let path = homedir().unwrap();
println!("{}", path.display())
}
And that's it!
rust
use simplehomedir::expandtilde;
fn main() {
// "/home/USER/local/share"
let expanded = simplehomedir::expandtilde("~/.local/share").unwrap();
}
``
There's also the
expandtilde` feature (disabled by default) which can expand upon the tilde from a given path.
This works on most operating systems.
The majority of the Windows portion of this has been noted from the windows-sys and directories crates.