Directory Utility TCL Routines
Default directories and file extensions can be specified for files to be read
into regions from disk (virtual regions) and from the pool (physical regions)
and to be written from a region to a disk file. These defaults (if they
exist) are automatically added onto the file name before reading or writing.
For example, if the default directory is specified as "/home/t2/brahe/fits" and
the default extension is specified as ".fits", then specifying "m31" will
actually mean "/home/t2/brahe/fits/m51.fits". In addition these defaults
can be returned to be used by another TCL procedure.
dirSet - Set the defaults
dirGet - Get the defaults
dirList - Format and list the defaults
Set the default directory and or file extension for use with virtual and
physical region IO. Either the directory, the file extension or both must be
specified on the command line.
TCL: dirSet <REGION_FILE | POOL_GROUP | PLOT_FILE | MASK_FILE> [-dir default directory]
[-ext default extension]
<REGION_FILE> Use this for IO involving virtual regions
(regReadAsFits or regWriteAsFits).
<POOL_GROUP> Use this for IO involving physical regions
(regReadPool).
<PLOT_FILE> Use this for IO involving pgplot routines
(pgGet and pgSave)
<MASK_FILE> Use this for IO involving masks (maskReadAsFits
and maskWriteAsFits)
[-dir] Default directory
[-ext] Default extension
Returns:
TCL_OK Successful completion.
TCL_ERROR Error occurred. The Interp result string will contain
the error string.
Get the default directory and or file extension for use with virtual and
physical region IO.
TCL: dirGet <REGION_FILE | POOL_GROUP> [-dir | -ext ]
<REGION_FILE> Use this for IO involving virtual regions
(regReadAsFits or regWriteAsFits).
<POOL_GROUP> Use this for IO involving physical regions
(regReadPool).
[-dir] Default directory
[-ext] Default extension
Returns:
TCL_OK Successful completion. The interp result string will
contain the requested default.
TCL_ERROR Error occurred. The Interp result string will contain
the error string.
List all the defaults.
TCL: dirlist
Returns:
TCL_OK Successful completion.