listDirectoriesRecursiveSync property
An extension property that recursively lists all directories in the current directory.
This property returns an Iterable of Directory objects, which are filtered from
the result of listAllRecursiveSync
.
Example usage:
var directories = someDirectory.listDirectoriesRecursiveSync;
for (var dir in directories) {
print(dir.path);
}
Note: Ensure that listAllRecursiveSync
is defined and returns an Iterable of file system entities.
Implementation
Iterable<Directory> get listDirectoriesRecursiveSync => listAllRecursiveSync.whereType<Directory>();