TEXT_IO.FOPEN
built-in functionThis function opens the designated file in the specified mode.
FUNCTION TEXT_IO.FOPEN
(spec VARCHAR2,
filemode VARCHAR2)
RETURN TEXT_IO.FILE_TYPE;
Parameter |
Description |
|
A case-insensitive string corresponding to a file's name. |
|
A single case-insensitive character that specifies the mode in which to open the file, and consists of one of the following characters: R Open the file for reading only. W Open the file for reading and writing after deleting all existing lines in the file. A Open the file for reading and writing without deleting existing lines (that is, appending). |
A handle to the specified file.
/*
** Declare two local variables to represent two files:
** one to read from, the other to write to.
*/
in_file TEXT_IO.FILE_TYPE;
out_file TEXT_IO.FILE_TYPE;
in_file := TEXT_IO.FOPEN('salary.txt', 'r');
out_file := TEXT_IO.FOPEN('bonus.txt', 'w');
About the TEXT_IO
built-in package
Copyright © 1984, 2005, Oracle. All rights reserved.