delete method
Deletes this FileSystemEntity
.
The exact details vary according to the FileSystemEntity
:
Implementation
@override
Future<file.FileSystemEntity> delete({bool recursive = false}) {
final completer = Completer<Directory>();
void callback([error]) {
if (error == null) {
completer.complete(this);
} else {
completer.completeError(error);
}
}
final jsCallback = js.allowInterop(callback);
fs.rmdir(path, RmdirOptions(recursive: recursive), jsCallback);
return completer.future;
}