[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


SPEC_DIR Source code in spec_dir.pro

SPEC_DIR

Name
     SPEC_DIR
Purpose
     Complete a file specification by appending the default disk or directory
Calling Sequence
     File_spec = SPEC_DIR( filename, [ extension ] )
Input Parameters
     filename - character string giving partial specification of a file
               name.  Examples for different operating systems include the
                       following:
               VMS: '$1$DUA5:TEST.DAT','[.SUB]TEST'
               Unix: 'pro/test.dat', '$IDL_HOME/test','~/subpro'
               MacOS: ':Programs:test'
               Windows: '\pro\test.dat','d:\pro\test'
Optional Input Parameters
     exten - string giving a default file name extension to be used if
             filename does not contain one.  Do not include the period.
Output Parameters
     File_spec - Complete file specification using default disk or
               directory when necessary.
Example
      IDL> a = spec_dir('test','dat')
      is equivalent to the commands
      IDL> cd, current=cdir
      IDL> a = cdir + delim + 'test.dat'
      where delim is the OS-dependent separator
Procedure
      SPEC_DIR() decomposes the file name using FDECOMP, and appends the
      default directory (obtained from the CD command) if necessary.
      Under VMS, SPEC_DIR() will also try to translate disk and directory
      logical names.
      SPEC_DIR() does not check whether the constructed file name actually
      exists.
Procedures Used
      EXPAND_TILDE(), FDECOMP
Revision History
      Written W. Landsman         STX         July, 1987
      Added Unix compatibility, W.  Landsman, STX   August 1991
      Added Windows and Macintosh compatibility   W. Landsman  September, 1995
      Work for relative Unix directory            W. Landsman  May, 1997
      Expand Unix tilde if necessary              W. Landsman  September 1997
      Converted to IDL V5.0   W. Landsman   September 1997
      Fix VMS call to TRNLOG()  W. Landsman       September 2000

Last modified by pro2html on 2001 April 26 at 03:14 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically