FILEISOPEN, ISOPEN v17

The FILEOPEN and the ISOPEN procedures determine whether a BFILE was opened with a specified FILE locator.

FILEISOPEN (<file_loc> IN BFILE) RETURN NUMBER

ISOPEN (<file_loc> IN BFILE) RETURN NUMBER

Parameters

file_loc

Locator for the BFILE.

Return value

ReturnDescription
1File is open
0File is not open

Example

DECLARE
   /* Initialize the BFILE locator: */
   File_loc1       BFILE := BFILENAME('ANOTHER_DIR', 'a.txt');
   ret             NUMBER;
BEGIN
   DBMS_LOB.OPEN(File_loc1, DBMS_LOB.LOB_READONLY);
   ret = DBMS_LOB.FILEISOPEN(File_loc);
   IF (RetVal = 1) THEN
       DBMS_OUTPUT.PUT_LINE('BFile is now open');
   ELSE
       DBMS_OUTPUT.PUT_LINE('BFile is not open');
   END IF;
   /* Close the BFILEs: */
   DBMS_LOB.FILECLOSE(File_loc1);
END;