getDirectoryCounts static method
Gets the file count for each subdirectory.
This method:
- Processes each directory in the provided list.
- Counts files ending with '.enc.ttl' in each directory.
- Returns a map of directory names to their file counts.
Parameters:
currentPath
: The parent directory path.directories
: List of subdirectory names to process.
Returns a map of directory names to their file counts.
Implementation
static Future<Map<String, int>> getDirectoryCounts(
String currentPath,
List<String> directories,
) async {
// Count files in each subdirectory.
final counts = <String, int>{};
for (var dir in directories) {
counts[dir] = await getDirectoryFileCount('$currentPath/$dir');
}
return counts;
}