Previous SAXO Documentation Assistant: Overview Next

Utilities/

isafile.pro

same as find except that as long as the file is 'NOT FOUND', isafile calls DIALOG_PICKFILE, to ask the user to select a file.

isafile Input/Output

result = isafile([filein], FILENAME=FILENAME, IODIRECTORY=IODIRECTORY, NEW=NEW, RECURSIVE=RECURSIVE, ONLYPRO=ONLYPRO, ONLYNC=ONLYNC, _EXTRA=_EXTRA)

Return value

the filename with its path

Parameters

filein        in optional

a proposed name. If neither filein input parameter or filename keyword are defined, we ask the user to choose a file.

Keywords

FILENAME       

a proposed filename.

IODIRECTORY       

a directory where we look for the file. this keyword is taken into account only if the dirname of filein or filename is '.'

NEW       

to specify that filename is a new file and that we should check only its path

RECURSIVE       

performs recursive searching of directory hierarchies. In a recursive search, find looks recursively for any and all subdirectories in the file hierarchy rooted at the IODIRECTORY argument.

ONLYPRO       

force to look only at file ending with .pro

ONLYNC       

force to look only at file ending with .nc

_EXTRA       

Used to pass keywords to find, FILE_SEARCH and DIALOG_PICKFILE

Examples


   IDL> print, isafile('/Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro')
  /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro
   IDL> print, isafile('cm_4mesh.pro', iodir = '/Users/sebastie/SAXO_RD/Commons')
  /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro
   IDL> print, isafile('cm_4mesh.pro', iodir = !path)
  /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro
   IDL> print, isafile('cm_4mesh.pro', iodir = '/Users/sebastie/SAXO_RD', /recursive)
  /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro
   IDL> print, isafile('cm_4mesh.pro', iodir = getenv('HOME'), /recursive)
  /Users/sebastie/SAXO_RD/Commons/cm_4mesh.pro
   IDL> print, isafile('fake_file.pro')

    

Version history

Version

$Id: isafile.pro 392 2009-02-10 09:34:16Z smasson $

History

Sebastien Masson (smasson@lodyc.jussieu.fr) 11/2/2000 June 2005: Sebastien Masson: cleaning, use for file_* functions

 


  Produced by IDLdoc 2.0.