Synchronous version of truncate.
Truncates (resizes) a file to the specified size.
If len is smaller than the current file size, the file is shortened and
the trailing data is discarded. If len is larger, the file is extended
with zero bytes (\x00).
Parameters
filePath: string
The absolute path of the file to truncate.
len: number
The target size in bytes. Must be a non-negative integer.
Synchronous version of
truncate. Truncates (resizes) a file to the specified size.If
lenis smaller than the current file size, the file is shortened and the trailing data is discarded. Iflenis larger, the file is extended with zero bytes (\x00).