Debian Codegraph @

/

debian rust-xdg-home 1.3.0-1debian librust-xdg-home-dev debian librust-xdg-home+default-dev debian librust-xdg-home-1-dev debian librust-xdg-home-1+default-dev debian librust-xdg-home-1.3-dev debian librust-xdg-home-1.3+default-dev debian librust-xdg-home-1.3.0-dev debian librust-xdg-home-1.3.0+default-dev cargo xdg-home 1.3.0 debianjsonmakefilemarkdownrustrustrust-c-abishelltomlyaml 18 files · 74 symbols
View dependency graph

Depends on

README (full)

xdg-home

Gets the user's home directory as per XDG Base Directory Specification.

This is almost the same as home (and dirs) crate, except it honors HOME environment variable on the Windows platform as well, which is conformant to the XDG Base Directory Specification.

Use it where the XDG Base Directory Specification is applicable, such as in D-Bus code.

Example

use xdg_home::home_dir;

let home = home_dir().unwrap();
assert!(home.is_absolute());
assert!(home.exists());
println!("Home directory: {}", home.display());
dir .github/
dir debian/
dir src/
file .cargo_vcs_info.json
file .gitignore
file Cargo.toml
file Cargo.toml.orig
file LICENSE-MIT
file README.md