rm method
Removes files and directories asynchronously (with recursive option).
Implementation
@override
Future<void> rm(
String fsPath, {
bool recursive = false,
bool force = false,
}) async {
try {
if (FileSystemEntity.isDirectorySync(fsPath)) {
await Directory(fsPath).delete(recursive: recursive);
} else {
await File(fsPath).delete();
}
} catch (e) {
if (!force) rethrow;
}
}