asDirectory function
convert to a directory object if necessary
Implementation
Directory asDirectory(FileSystemEntity? dir) {
if (dir is Directory) {
return dir;
} else {
return dir!.fs.directory(dir.path);
}
}
convert to a directory object if necessary
Directory asDirectory(FileSystemEntity? dir) {
if (dir is Directory) {
return dir;
} else {
return dir!.fs.directory(dir.path);
}
}