getAllDirectoryinDirectory static method
Implementation
static Future<List<Directory>> getAllDirectoryinDirectory(path) async {
List<Directory> files = [];
Directory? directory = Directory(path);
if (await directory.exists()) {
List<FileSystemEntity> entities = directory.listSync(recursive: true);
for (var entity in entities) {
if (entity is Directory) {
files.add(entity);
}
}
}
return files;
}