SeekOrigin

Overview

Specifies the position in a stream to use for seeking.

You can use this type with FileHandle class to specify position of seek.

var LogFile := Folder.UserLocal.CreateFile("log.txt", false);
var Handle := LogFile.Open(FileOpenMode.ReadWrite);
try
  Handle.Write([72, 101, 108, 108, 111]);
  Handle.Seek(0, SeekOrigin.Begin);
  writeLn(new Sugar.String(Handle.Read(5).ToArray));
finally
  Handle.Close;
  LogFile.Delete;
end;

Location

Value Description
Begin Specifies the beginning of a file.
Current Specifies the current position within a file.
End Specifies the end of a file.