fix download

This commit is contained in:
wgh19
2024-05-14 18:10:30 +08:00
parent 9ba859d668
commit 07ff6d9526
5 changed files with 37 additions and 21 deletions

View File

@@ -21,6 +21,18 @@ extension FSExt on FileSystemEntity {
}
}
extension DirectoryExt on Directory {
bool havePermission() {
if(!existsSync()) return false;
try {
listSync();
return true;
} catch (e) {
return false;
}
}
}
String bytesToText(int bytes) {
if(bytes < 1024) {
return "$bytes B";