17 releases
0.4.5 | Dec 2, 2024 |
---|---|
0.4.4 | Nov 5, 2024 |
0.4.3 | Oct 3, 2024 |
0.4.0 | Jul 20, 2024 |
0.1.1 |
|
#212 in Filesystem
3,417 downloads per month
Used in 19 crates
(17 directly)
5KB
simple-home-dir
A minimal, fast, and reliable crate dedicated to retrieving the user's home directory.
Usage
use simple_home_dir::*;
fn main() {
// Windows => C:\Users\jdoe
// Linux => /home/jdoe
// Mac => /Users/jdoe
let path = home_dir().unwrap();
}
Features
The expand_tilde
feature is available here.
Testing
The dirs crate is relied upon to ensure that the functions of this crate are working properly.
Credit
The majority of the Windows portion has been noted from the windows-sys and directories crates.
Dependencies
~0–7.5MB
~55K SLoC