delDir static method
递归方式删除目录
Implementation
static Future delDir(FileSystemEntity file) async {
try {
if (file is Directory) {
final List<FileSystemEntity> children = file.listSync();
for (final FileSystemEntity child in children) {
await delDir(child);
}
}
await file.delete();
} catch (e) {
logger.e('删除目录失败「$e」');
}
}