;+ ; NAME: ; isfile ; PURPOSE: ; Check if a file exists ; DESCRIPTION: ; CATEGORY: ; fileio ; CALLING SEQUENCE: ; exists = IsFile(fn) ; INPUTS: ; fn: the filename ; OPTIONAL INPUT PARAMETERS: ; KEYWORD INPUT PARAMETERS: ; OUTPUTS: ; exists (boolean): true if file exists ; KEYWORD OUTPUT PARAMETERS: ; COMMON BLOCKS: ; SIDE EFFECTS: ; RESTRICTIONS: ; PROCEDURE: ; call findfile ; MODIFICATION HISTORY: ; 2002/05/30 - Initial version written, Leslie Young SwRI ;- function isfile, fn res = findfile(fn, count = count) return, (count gt 0) end pro isfileTEST fn = 'isfile.pro' print, fn, IsFile(fn) fn = 'NoSuchFile' print, fn, IsFile(fn) end