https://github.com/splurf/simple-home-dir
Simple and tiny library for getting a user's home directory.
https://github.com/splurf/simple-home-dir
home-directory rust
Last synced: about 1 year ago
JSON representation
Simple and tiny library for getting a user's home directory.
- Host: GitHub
- URL: https://github.com/splurf/simple-home-dir
- Owner: splurf
- License: mit
- Created: 2023-03-31T22:03:19.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-02-27T00:33:38.000Z (over 1 year ago)
- Last Synced: 2025-03-25T21:02:25.246Z (over 1 year ago)
- Topics: home-directory, rust
- Language: Rust
- Homepage: https://crates.io/crates/simple-home-dir
- Size: 43.9 KB
- Stars: 4
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# simple-home-dir
[](https://crates.io/crates/simple-home-dir)
A minimal, fast, and reliable crate dedicated to retrieving the user's home directory.
## Usage
```rust
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](https://crates.io/crates/simple-expand-tilde).
### Testing
The [dirs](https://crates.io/crates/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](https://crates.io/crates/windows-sys) and [directories](https://crates.io/crates/directories) crates.