Topic group Related topics Example
Returns true if the file pointer is at the end of a file previously opened with create( ) or open( )
A reference to the File object that created or opened the file.
eof( ) determines if the file pointer of the file you specify is at the end of the file (EOF), and returns true if it is and false if it is not. The file pointer is considered to be at EOF if it is positioned at the byte after the last character in the file.
You can move the file pointer to the end of the file with seek( ). If a file is empty, as it is when you first create a new file with create( ), eof( ) returns true.