The
FILEPATH function returns the
fully-qualified path to a file found in the IDL distribution. Operating system dependencies are taken into consideration. This routine is used by Research Systems to make the library routines portable. This routine is written in the IDL language. Its source code can be found in the file
filepath.pro
in the
lib
subdirectory of the IDL distribution.
A string containing the name of the directory from which the resulting path should be based. If not present, the value of !DIR is used. This keyword is ignored if TERMINAL or TMP are specified.
The name of the subdirectory in which the file should be found. If this keyword is omitted, the main IDL directory is used. This variable can be either a scalar string or a string array with the name of each level of subdirectory depth represented as an element of the array.
For example, to get a path to the file
filepath.pro
in IDL's
lib
subdirectory, enter:
Set this keyword to indicate that the specified file is a scratch file. Returns a path to the proper place for temporary files under the current operating system.
Under Microsoft Windows, FILEPATH checks to see if the following environment variables are set--TMP, TEMP, WINDIR--and uses the value of the first one it finds. If none of these environment variables exists, \TMP is used as the temporary directory.