FLexpHome


Routine

int FLexpHome (const char Fname[], char Ename[])

Purpose

Expand the home directory specification for a file

Description

This routine takes an input file name and replaces instances of "~" or "~USER" which appear as the first component of a directory specification. The first form is replaced by the home directory of the current user and the second form is replaced by the home directory of the named user. If the home directory cannot be determined, for instance if the user is unknown, or the home directory specification is empty, the output file name is copied from the input file name.

Parameters

<- int FLexpHome
Number of characters in the output string
-> const char Fname[]
Input character string specifying a file name path
<- char Ename[]
Output string with the home directory expanded. This string is at most FILENAME_MAX characters long including the terminating null character.

Author / revision

P. Kabal / Revision 1.20 2003/05/09

See Also

FLdirName, FLhomeDir


Main Index libtsp