RAD Studio VCL Reference
ContentsIndex
PreviousUpNext
System.Truncate Function

Deletes all the records after the current file position.

Pascal
procedure Truncate(var F);
C++
Truncate( F);

System

In Delphi code, Call Truncate to cause the current file position to become end-of-file (Eof(F) is true). 

F is a file variable of any type except a text file. Truncate does not work on text files. F must be open. 

 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!