truncateFile method

  1. @override
void truncateFile(
  1. String path,
  2. int length
)
override

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) {
  final type = _recognizeType(path);
  if (type == null) {
    _memory.truncateFile(path, length);
  } else {
    _files[type]!.truncate(length);
  }
}