truncateFile method
Sets the size of the file at path
to length
.
If the file was smaller than length
before, the rest is filled with
zeroes.
Implementation
@override
void truncateFile(String path, int length) {
_checkClosed();
_memory.truncateFile(path, length);
if (!_inMemoryOnlyFiles.contains(path)) {
_submitWorkFunction(
() async => _asynchronous.truncate(await _fileId(path), length),
'truncate $path');
}
}