The FGETPOS function returns the current relative offset position within a file, in bytes.
Syntax
UTL_FILE.FGETPOS (
file IN FILE_TYPE)
RETURN PLS_INTEGER;
Parameters
| Parameter | Description |
|---|---|
| file | The directory that stores the source file. |
Return values
The FGETPOS function returns the accessed position (offset in bytes) in the open file. If the file is not opened, an error occurs. If the file is opened in w mode, 0 is returned.
Exceptions
INVALID_FILEHANDLEINVALID_OPERATIONREAD_ERROR
Usage notes
The file must be opened in r mode; otherwise, the INVALID_OPERATION exception will be thrown.