Skip to content

BFILENAME

BFILENAME(directory_alias, file_name)where,- directory_alias is a character value that specifies the alias for the application directory,- file_name is a character value that specifies the name of the file.

Section titled “BFILENAME(directory_alias, file_name)where,- directory_alias is a character value that specifies the alias for the application directory,- file_name is a character value that specifies the name of the file.”
  • directory_alias: This is a character value that represents the alias of the directory within the application. It assists in the identification and organization of data.
  • file_name: This is a character value which designates the specific name of the file. It allows for individual file recognition and access within the overall data management system.
DECLARE
v_file BFILE;
BEGIN
v_file := BFILENAME('MY_DIRECTORY', 'my_file.txt');
DBMS_OUTPUT.PUT_LINE(v_file);
END;
BFILE('MY_DIRECTORY','my_file.txt')

In the example, BFILENAME function is used to create a BFILE locator that references a file located in the directory named MY_DIRECTORY with the name my_file.txt. The BFILE locator is stored in the v_file variable. The DBMS_OUTPUT.PUT_LINE procedure is used to display the BFILE locator.