This section describes the implementation of the Common Lisp function
user-homedir-pathname
.
On Unix-based systems, the home directory is looked up using the C function getpwuid.
On Windows systems,
user-homedir-pathname
uses the environment to construct its result. It uses the values of the environment variables HOMEDRIVE and HOMEPATH, if both are defined. If at least one of environment variables HOMEDRIVE and HOMEPATH is not defined, then a pathname
#P"C:/users/
login-name
"
is returned. These environment variables should be correctly set before LispWorks starts. However it is possible to change the values in Lisp using
(setf lw:environment-variable)