Seek

This function sets the stream position for reading and writing.

Syntax

Parameters

Returns

Returns an unsigned short value read from the stream.

Example

local path = "MyFile.dat" 

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

stream:WriteLine("Hello!")
stream:Seek(0)
System:Print(stream:ReadLine())