<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Utilities/

isafile.pro

same as find.pro except that as long as the file is 'NOT FOUND', isafile calls dialog_pickfile, to ask the user to select a file. all find, file_search and dialog_pickfile keywords (like title) can be used

topisafile io

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 of filename keyword are defined, the 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 dirmame 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       

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

History

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