Home > Language Reference > Classes > StreamFile

Truncate Method

Truncates a file.

Syntax

Public Sub Truncate()

Remarks

The Truncate method deletes all the data contained between the current pointer position and the end of the file. The stream pointer position is not modified, only the size of the file is reduced if necessary. Like most of this object's functionality, calling this property causes a runtime error if the file has not previously been opened using the Open method.

System requirements

SystemMinimal versionRemarks
Palm OSPalm OS 3.0Requires an expansion slot.
Windows CEWindows CE 3.0-