FLhomeDir
Routine
-
int FLhomeDir (const char User[], char Home[])
Purpose
-
Get the home directory for a user
Description
This routine returns the path name corresponding to the home directory for a
user. When the User argument is empty, the current user is assumed. There
are several cases. The search order is: environment variables HOMEDRIVE and
HOMEPATH (current user on Windows systems), home directory in the password
entry (Posix systems), and finally the environment variable HOME (current
user). If the home directory cannot be obtained (for instance, the user is
not known) the home directory string is returned as the empty string.
Parameters
-
<- int FLhomeDir
-
Number of characters in the output string
-
-> const char User[]
-
Input character string specifying the user. If this string is empty, the
home directory for the current user is returned.
-
<- char Home[]
-
Output string with the home directory. Except for the case of the root
directory "/", the directory name does not have a trailing '/' character.
This string is at most FILENAME_MAX characters long including the
terminating null character.
Author / revision
P. Kabal
/ Revision 1.26 2009/03/01
See Also
FLexpHome
Main Index libtsp