truncateAsync

external fun truncateAsync(size: UInt53): Promise<Void>(source)

The truncate() method of the FileSystemWritableFileStream interface resizes the file associated with the stream to the specified size in bytes.

MDN Reference