Expand description
Contains the implementation of the crate for Unix systems.
Functions
- Get a user’s home directory path.
- Get a user’s home directory path from their user identifier.
- Get a user’s id from their username. This function operates identically to the
get_home
function, except it reads theuid
field from theUser
structure instead of thedir
field. Because of this, doingget_home_from_id(get_id(name))
is not recommended. Instead,get_home(name)
should be used. - Get this process’ user’s home directory path.
- Get the current process’ real user id. This uses the nix crate’s
Uid::current
method, which usesgetuid(3)
. This function will never return theErr
variant on Unix systems. However, the error is kept so that the API remains the same on both Unix and Windows.
Type Aliases
- The error type returned by
get_home
upon failure. - An identifier for a user.