Returns the path to the user's home directory.
The returned value depends on the operating system and is either a
Some, containing a value from the following table, or a
$HOMEif it is set and not empty.
$HOMEis not set or empty, then the function
getpwuid_ris used to determine the home directory of the current user.
getpwuid_rlacks an entry for the current user id or the home directory field is empty, then the function returns
This function retrieves the user profile folder using
All the examples on this page mentioning
$HOME use this behavior.
Note: This function's behavior differs from
which works incorrectly on Linux, macOS and Windows.