The IS_OPEN function tests whether a file handle identifies an open file.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
UTL_FILE.IS_OPEN (
file IN FILE_TYPE)
RETURN BOOLEAN;
Parameters
Parameter |
Description |
|---|---|
| file | The active file handle returned by the FOPEN or FOPEN_NCHAR function. |
Return value
The IS_OPEN function returns a value of the BOOLEAN type.
- If the return value is
TRUE, the file handle is valid and the corresponding file is open. - If the return value is
FALSE, the file is closed or the file handle is invalid.
Exceptions
INVALID_FILEHANDLE
Considerations
- The file handle passed to
IS_OPENmust be obtained from a successful call toFOPENorFOPEN_NCHAR. An uninitialized or released handle will cause the function to returnFALSE. IS_OPENonly reports whether the file handle represents a file that is open and has not been closed. It does not guarantee that no operating system errors will occur when using the file handle.- Unlike most procedures in the
UTL_FILEpackage,IS_OPENdoes not typically raise an exception. Its design purpose is to safely query the status, so it will returnFALSEinstead of an error even if the handle is invalid.