Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]

FILE_EXPAND_PATH


Syntax | Return Value | Arguments | Keywords | Examples | Version History | See Also

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
This routine should be used only to make sure that file paths are fully qualified, but not to expand wildcard characters (e.g. *). The behavior of FILE_EXPAND_PATH when it encounters a wildcard is platform dependent, and should not be depended on. These differences are due to the underlying operating system, and are beyond IDL's control. To expand wildcards and obtain fully qualified paths, combine the FINDFILE function with FILE_EXPAND_PATH:

A = FILE_EXPAND_PATH(FINDFILE('*.pro'))

Alternatively, use the FILE_SEARCH function with the FULLY_QUALIFY_PATH keyword:

A = FILE_SEARCH('*.pro', /FULLY_QUALIFY_PATH)

Syntax

Result = FILE_EXPAND_PATH (Path)

Return Value

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.

Arguments

Path

A scalar or array of file or directory names to be fully qualified.

Keywords

None.

Examples

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_5.4/lib/dist.pro 

Version History

Introduced: 5.4

See Also

FILE_SEARCH, FINDFILE


Categories | Alphabetical | Classes | All Contents | [ < ] | [ > ]