File.eof() (Method)

This method returns a flag indicating whether we are at the end of the file or not.

Availability:

JavaScript - 1.1
Netscape Enterprise Server - 2.0
Property/method value type:Boolean primitive
JavaScript syntax:NESmyFile.eof()

If we are currently positioned at the end of the file (the getLength() and getPosition() method calls return an equivalent value), then this method returns the Boolean true value. Any other position within the file will return false.

A zero length file can only ever have a file pointer positioned at its end of file so it will always return true if the getLength() method returns zero.