The FGETATTR stored procedure is used to read and return the attributes of a disk file.
Applicability
This topic applies only to OceanBase Database Enterprise Edition. OceanBase Database Community Edition does not support this feature.
Syntax
UTL_FILE.FGETATTR(
location IN VARCHAR2,
filename IN VARCHAR2,
fexists OUT BOOLEAN,
file_length OUT NUMBER,
block_size OUT BINARY_INTEGER);
Parameters
Parameter |
Description |
|---|---|
| location | The directory location of the source file, which is the DIRECTORY_NAME in the ALL_DIRECTORIES view (case-sensitive). |
| filename | The name of the file to be checked. |
| fexists | Indicates whether the file exists. |
| file_length | The length of the file in bytes. If the file does not exist, NULL is returned. |
| block_size | The size of a file system block in bytes. If the file does not exist, NULL is returned. |
Considerations
FGETATTR is used to obtain information about a file, such as its existence, size, and file system block size, without opening the file. The location must be the name of a directory object that has been created using CREATE DIRECTORY and for which the current user has access permissions.