deleteFile method

void deleteFile(
  1. String path
)

Delete the file with the given path.

Implementation

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

  _pathToData.remove(path);
  _removeFromParentFolderData(path);

  _notifyWatchers(path, ChangeType.REMOVE);
}