Skip to main content

home_dir

Function home_dir 

Source
pub fn home_dir() -> PathBuf
Expand description

Returns the user’s home directory

This method first checks the HOME environment variables. If not set, it falls back to constructing the path /home/{username} where username is obtained from the system.

§Example

use soar_utils::path::home_dir;

let home = home_dir();
println!("Home dir is {:#?}", home);