EOF

This function is used to indicate whether the end of a file has been reached, when reading.

Syntax

Returns

Returns true if the end of the file has been reached, otherwise false is returned.

Example

local path = "MyFile.dat" 

local stream = FileSystem:WriteFile(path)
if (stream==nil) then Debug:Error("Failed to write file.") end

for i=0, 9 do

stream:WriteInt(i)
end

stream:Release()

stream = FileSystem:ReadFile(path)
if (stream==nil)then Debug:Error("Failed to read file.") end

while (not stream:EOF()) do

System:Print(stream:ReadInt())
end

stream:Release()