ServersYour serverFor creatorsForumFAQDocumentationSecurity
Download the launcher
  1. Documentation
  2. Shared functions
  3. fileIsEOF

Function

fileIsEOF

Server and clientFilesIdentical to MTA:SA

Checks whether the file position has reached the end.

Syntax

bool fileIsEOF(file theFile)

Arguments

theFilefile
A file handle.

Returns

true at the end of the file.

Example

local file = fileOpen("lines.txt", true)
local text = ""
while not fileIsEOF(file) do text = text .. fileRead(file, 1024) end
fileClose(file)

See also