Classes.TStream.Seek

From RAD Studio VCL Reference
Jump to: navigation, search

Contents

Delphi Information

From Classes.pas

	function Seek(Offset: Integer; Origin: Word): Integer; overload; virtual;
 
	function Seek(const Offset: Int64; Origin: TSeekOrigin): Int64; overload; virtual;


Unit: Classes

Type: method

Visibility: public

Member Of: TStream

C++ Information

From Classes.hpp

	virtual int __fastcall Seek(int Offset, unsigned short Origin);
 
	virtual __int64 __fastcall Seek(__int64 Offset, Classes::TSeekOrigin Origin);


Unit: Classes

Type: method

Visibility: public

Member Of: TStream

Description

Moves to a specified position in the streamed resource.


Call Seek to move the current position of the stream in its particular storage medium (such as memory or a disk file).

The Origin parameter indicates how to interpret the Offset parameter. Origin should be one of the following values:



Value Meaning

soBeginning

Offset is from the beginning of the resource. Seek moves to the position Offset. Offset must be >= 0.

soCurrent

Offset is from the current position in the resource. Seek moves to Position + Offset.

soEnd

Offset is from the end of the resource. Offset must be <= 0 to indicate a number of bytes before the end of the file.



Seek returns the new value of the Position property.

Seek is called by the Position and Size properties.

Note:  As implemented in TStream, the two versions (the 32-bit or 64-bit syntax) call each other. Descendant stream classes must override at least one of these versions, and the override must not call the inherited default implementation.

See Also

Personal tools
Translations
Newest Version