simple-home-dir

Crates.iosimple-home-dir
lib.rssimple-home-dir
version0.4.4
sourcesrc
created_at2023-03-31 22:03:38.02533
updated_at2024-11-05 18:55:16.046079
descriptionEffortlessly retrieve the user's home directory (cross-platform).
homepage
repositoryhttps://github.com/splurf/simple-home-dir
max_upload_size
id826904
size4,025
Evan Schwartzentruber (splurf)

documentation

README

simple-home-dir

Crate

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.

Commit count: 76

cargo fmt