homedir

Function home

source
pub fn home<S: AsRef<str>>(username: S) -> Result<Option<PathBuf>, GetHomeError>
Expand description

Get the home directory of an arbitrary user. This will return the Err variant if an error occurs. If no user with the given username can be found, Ok(None) is returned instead.

There is an example of the usage of this function in the crate documentation.