SetDiskFilelength (open)

Set the size of a file on disk


LOADLIB "wh::files.whlib";

MACRO SetDiskFilelength(INTEGER filehandle, INTEGER64 filesize)


INTEGER filehandle

ID of file, as returned by OpenDiskFile or CreateDiskFile

INTEGER64 filesize

The new size for the file in bytes


Set the size of a file on disk, truncating or extending it as necessary. If the file pointer points outside the new file, it is moved to EOF, otherwise it is not moved. If a file is extended, the new bytes will be set to zero.