Name
FilePos -- return file cursor position (V2.0)
Synopsis
pos = FilePos(id)
Function
This function returns the file cursor position of the file specified by id. The cursor starts at 0 (beginning of the file) and ends at the length of the file. You can use this function to find out where you are in a file because all read and write operations will start at this cursor position. You can use Seek() to modify the file cursor position.

Inputs
id
identifier of the file to query
Results
pos
cursor position of this file
Example
OpenFile(1, "test.txt", #MODE_READ)
Seek(1, 1024)
Print(FilePos(1))
CloseFile(1)
This prints 1024.

Show TOC