DtclFindFile - Find a file using search paths, defaultings and wildcards.

Function

Find a file using search paths, defaultings and wildcards.

Description

This command will return the a list names which can be used to open all files which meet the given file specification, after the application of defaults, wildcards and search paths. For example,
     DtclFindFile "FRED_DIR:*.c"
     DtclFindFile FRED_DIR: -default "*.c"
will both search the envionment variable/logical name search path FRED_DIR for all .c files and return names that be be used in an open statement. Under VMS, a search path is a logical name directory search path. Under UNIX/VxWorks, a search path is a colon separated list of directory names (in the format used by the PATH environment variable)

For application of defaults, each filename is broken up into three components, the directory spec, the filename and the file type. If a component is not supplied by the file specification, then it is taken from the default specification, if supplied.

Wildcards appropiate to the machine on which the program is being run can be specified.

Note the requirement for quotes around anything which may be interpeted by the Tcl.

Call

DtclFindFile name [options]

Parameters

>namestringName of file to find.

Options

-oneonly
Return the first file only.
-default (string)
The string specifies the default file name.
-nowild
Disallow wildcards.

Language

Tcl

See Also

DTCL manual, DulFindFile(3).

Support

Tony Farrell, AAO

Click here for the DRAMA home page and here for the AAO home page.

 For more information, contact tjf@aaoepp.aao.gov.au