procedure Truncate(var F: File);
Deletes all the records after the current file position.
In Object Pascal 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.