delete method

  1. @override
Future<void> delete(
  1. String path, {
  2. required bool recursive,
})

Delete the file system contents at the given path.

If the target is a non-empty directory and recursive is not specified, an error will be returned.

Implementation

@override
Future<void> delete(String path, {required bool recursive}) {
  final newPath = join(_root, _sanitizePath(path));
  File(newPath).deleteSync(recursive: recursive);
  return SynchronousFuture(null);
}