Crates.io | simple-home-dir |
lib.rs | simple-home-dir |
version | |
source | src |
created_at | 2023-03-31 22:03:38.02533 |
updated_at | 2024-12-02 01:27:09.990702 |
description | Effortlessly retrieve the user's home directory (cross-platform). |
homepage | |
repository | https://github.com/splurf/simple-home-dir |
max_upload_size | |
id | 826904 |
Cargo.toml error: | TOML parse error at line 25, column 1 | 25 | autolib = false | ^^^^^^^ unknown field `autolib`, expected one of `name`, `version`, `edition`, `authors`, `description`, `readme`, `license`, `repository`, `homepage`, `documentation`, `build`, `resolver`, `links`, `default-run`, `default_dash_run`, `rust-version`, `rust_dash_version`, `rust_version`, `license-file`, `license_dash_file`, `license_file`, `licenseFile`, `license_capital_file`, `forced-target`, `forced_dash_target`, `autobins`, `autotests`, `autoexamples`, `autobenches`, `publish`, `metadata`, `keywords`, `categories`, `exclude`, `include` |
size | 0 |
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.