declare
fh utl_file.file_type;
begin
fh := utl_file.fopen(
location => 'THE_DIRECTORY',
filename => 'the-file.txt',
open_mode => 'r',
max_linesize => 32767 -- Default is 1024
);
open_mode can be set to r | to read text |
w | to write text (creates file) |
a | to append text (create file if it doesn't exist) |
b can be appended to these three values to indicate byte mode.