System.Classes.THandleStream.SetSize

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure SetSize(NewSize: Longint); override;
procedure SetSize(const NewSize: Int64); override;

C++

virtual void __fastcall SetSize(System::LongInt NewSize)/* overload */;
virtual void __fastcall SetSize(const __int64 NewSize)/* overload */;

Properties

Type Visibility Source Unit Parent
procedure
function
protected
System.Classes.pas
System.Classes.hpp
System.Classes THandleStream

Description

Sets the end of the file marker to truncate the resource at the indicated position.

Call SetSize to set the size of the resource. SetSize calls Seek to go to the indicated position, and then writes an end of file marker. If the size of the resource cannot be changed, an exception is raised. For example, calling SetSize for a file handle that was opened in fmOpenRead mode will raise an exception.

See Also