15 unstable releases (3 breaking)
0.4.3 | Oct 3, 2024 |
---|---|
0.4.0 | Jul 20, 2024 |
0.3.2 | Jan 21, 2024 |
0.2.1 | Dec 27, 2023 |
0.1.1 |
|
#151 in Filesystem
4,225 downloads per month
Used in 18 crates
(15 directly)
5KB
simple-home-dir
An extremely tiny and reliable Rust library purposed to retrieve the user's home directory.
Usage
use simple_home_dir::*;
fn main() {
// Windows => "C:\Users\<USER>"
// Linux => "/home/<USER>"
// Mac => "/Users/<USER>"
let path = home_dir().unwrap();
println!("{:?}", path)
}
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–8MB
~61K SLoC