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