GetPos

This function gets the current position of a stream, for reading and writing.

Syntax

Returns

Returns the current file position.

Example

local path = "MyFile.dat" 

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

stream:WriteLine("Hello")
System:Print("Stream position: "..stream:GetPos())

stream:Release()