Seek

Declaration: TFileStream.Seek (Offset: longint; Origin: word): longint;
The method Seek moves the stream Position in the file stream to the value Offset. Offset is interpreted differently, depending on the value of Origin:

soFromBeginning Offset is from the beginning of the resource. Seek moves to the position Position. Offset must be >= 0.
soFromCurrent Offset is from the current position in the resource. Seek moves to Position + Position.
soFromEnd Offset is from the end of the resource. Position must be <= 0 to indicate a number of bytes before the end of the file.

Seek returns the new value of the Position property.