Sets the current file position.
Use this command to set your position in a file. The value is in bytes from the origin, which you specify in the
origin argument. The file position can be set past the end of the file in Write mode.
This command only makes sense in files opened in binary mode.
|string||Origin that the offset is defined against, either beg for the beginning of the file, cur for the current file position, or end for the end of the file.|
|int||Offset in bytes from the origin to set the file position to|
|int||ID of file previously opened with fileOpen|
|Name||Flag arguments||Argument type||Exclusive to||Comments|
$fileID = `fileOpen "C:/testfile.log" "r"`;
// Read a value from the file, which "points" to another part of the
// file. This could be done in a file "header" section
$filePos = `readInt $fileID`;
// Move to the file position "pointed" to earlier, so we can do some
setFilePos $fileID $filePos;