The following low-level file functions are equivalent to the following methods in the File class:

Function

File class method

FCLOSE( )

close( )

FCREATE( )

create( )

FEOF( )

eof( )

FERROR( )

error( )

FFLUSH( )

flush( )

FGETS( )

gets( ) and readln( )

FOPEN( )

open( )

FPUTS( )

puts( ) and writeln( )

FREAD( )

read( )

FSEEK( )

seek( )

FWRITE( )

write( )

These functions are not described separately. While a File object automatically maintains its file handle in its handle property, low-level file functions must explicitly specify a file handle, with the exception of FERROR( ), which does not act on a specific file. The FCREATE( ) and FOPEN( ) functions take the same parameters as the create( ) and open( ) methods, and return the file handle.

The other functions use the file handle as their first parameter and all other parameters (if any) following it The parameters following the file handle in the function are identical to the parameters to the equivalent method, and the functions return the same values as the methods.

Compare the examples for exists( ) and FILE( ) to see the difference between using a File object and low-level file functions.