modifyFile method

void modifyFile(
  1. String path,
  2. String content
)

Implementation

void modifyFile(String path, String content) {
  var data = _pathToData[path];
  if (data is! _FileData) {
    throw FileSystemException(path, 'Not a file.');
  }

  _pathToData[path] = _FileData(
    bytes: utf8.encode(content) as Uint8List,
    timeStamp: nextStamp++,
  );
  _notifyWatchers(path, ChangeType.MODIFY);
}