FILE_READLINK
Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also
The FILE_READLINK function returns the path pointed to by UNIX symbolic links.
Syntax
Result = FILE_READLINK(Path [, /ALLOW_NONEXISTENT] [, /ALLOW_NONSYMLINK] [, /NOEXPAND_PATH] )
Return Value
Returns the path associated with a symbolic link.
Arguments
Path
A scalar string or string array containing the names of the symbolic links to be translated.
Keywords
ALLOW_NONEXISTENT
Set this keyword to return a NULL string rather than throwing an error if Path contains a non-existent file.
ALLOW_NONSYMLINK
Set this keyword to return a NULL string rather than throwing an error if Path contains a path to a file that is not a symbolic link.
NOEXPAND_PATH
Set this keyword to cause FILE_READLINK to use Path exactly as specified, without expanding any wildcard characters or environment variable names included in the path. See FILE_SEARCH for details on path expansion.
Examples
Under Mac OS X, the /etc directory is actually a symbolic link. The following statement reads it and returns the location to which the link points:
It is possible to have chains of symbolic links, each pointing to another. The following function uses FILE_READLINK to iteratively translate such links until it finds the actual file:
Version History