truncate method
@AvailableInWorkers("dedicated")
The truncate()
method of the
FileSystemSyncAccessHandle interface resizes the file associated with
the handle to a specified number of bytes.
Note: In earlier versions of the spec, FileSystemSyncAccessHandle.close, FileSystemSyncAccessHandle.flush, FileSystemSyncAccessHandle.getSize, and
truncate()
were wrongly specified as asynchronous methods, and older versions of some browsers implement them in this way. However, all current browsers that support these methods implement them as synchronous methods.
Implementation
external void truncate(int newSize);