Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.tools -> Re: UTL_FILE - check for file existence?
> Is there some way of using the UTL_FILE package to check to see if a
> non-text file(.jpg) exists?
The following are the built-in exceptions for the UTL_FILE package:
exception
when utl_file.invalid_mode then
raise_application_error (-20051, 'Invalid Option');
when utl_file.invalid_path then
raise_application_error (-20052, 'Invalid Path');
when utl_file.invalid_filehandle then
raise_application_error (-20053, 'Invalid Filehandle');
when utl_file.invalid_operation then
raise_application_error (-20054, 'Invalid operation');
when utl_file.read_error then
raise_application_error (-20055, 'Read Error'); when utl_file.write_error then raise_application_error (-20056, 'Write Error');when utl_file.internal_error then
I would think that "Invalid Filehandle" or "Read Error" would do quite nicely. Just test out these operations in their own code block and handle the exception if it is generated.
Daniel A. Morgan Received on Wed Jan 24 2001 - 22:54:21 CST