[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: filename check
"Stuart Colley" <email@example.com> wrote...
> Can anyone suggest a way to check that a file exists before attempting to
> read from it, since the error messages obtained from trying to read from a
> non-existing file, don't make it clear that file doesn't exist.
Of course, the solutions in all the other replies point to why this was
needed, and now appears in IDL 5.4:
IDL> Print, File_Test('image.gif')
IDL> Print, File_Test('image.tif')
File_Test has many fancy keywords for "what kind of file do you expect to
[, /DIRECTORY | , /EXECUTABLE | , /READ | , /REGULAR | , /WRITE | ,
/ZERO_LENGTH] [, GET_MODE=variable]
Dick Jackson / firstname.lastname@example.org
D-Jackson Software Consulting / http://www.d-jackson.com
Calgary, Alberta, Canada / Voice/Fax: +1-403-242-7398