The FILE_EXPAND_PATH function expands a given file or partial directory name to its fully qualified name regardless of the current working directory.
| Note |
A = FILE_SEARCH('*.pro', /FULLY_QUALIFY_PATH)
Result = FILE_EXPAND_PATH (Path)
FILE_EXPAND_PATH returns a fully qualified file path that completely specifies the location of Path without the need to consider the user's current working directory. If Path is a NULL string, FILE_EXPAND_PATH returns the fully qualified path to the current working directory.
A scalar or array of file or directory names to be fully qualified.
None.
In this example, we change directories to the IDL lib directory and expand the file path for the DIST function:
cd, FILEPATH('', SUBDIRECTORY=['lib']) print, FILE_EXPAND_PATH('dist.pro')
This results in the following if run on a UNIX system:
/usr/local/rsi/idl_6.1/lib/dist.pro
Introduced: 5.4