Produced by IDL 7.1.1
User Documentation

./toolbox
file_exists.pro

Last modification date:
Wed Sep 28 13:27:11 2016

file_exists

function file_exists(filename[, fullname], [dir=string], [size=variable])

Check if a file name exists. Return 1 if it does, 0 if it doesn't. Also return the fully qualified name where the file was found.

If keyword dir is supplied then search through all of the directories in the string array dir. In this case filename should not contain a directory path.

This routine is handy to search for the location of an online datafile. They start in /share/olcor/ but get moved to /proj/projid/ directories at some later point.

NOTE: this routine will only find regular files, a directory name will return a non-existant file.

This code came from Phil Perillat at Arecibo. Local changes:

Returns
1 file found, 0 not found
Examples
   
   istat=file_exists('/share/olcor/corfile.13aug02.x101.1',fullname)

   dir=['/share/olcor/','/proj/x101cor/']
   istat=file_exists('corfile.13aug02.x101.1',fullname,dir=dir)
 
Version
$Id$

Parameters
filename
in, required
string
filename to search for
fullname
out, optional
variable
full directory/filename where file was found. :

Keywords
dir
in, optional
string
If supplied then search through these directories. May be a vector.
size
in/out, optional
variable
If supplied then set this to the file size in bytes, if it exists.


Produced by IDLdoc 1.6 on Wed Sep 28 13:27:39 2016