scan method
Implementation
Future<ScanResult> scan({
required List<String> roots,
int maxDepth = 6,
}) async {
final entries = <ScanEntry>[];
for (final root in roots) {
entries.addAll(await _scanRoot(root, maxDepth: maxDepth));
}
entries.sort((a, b) => b.bytes.compareTo(a.bytes));
return ScanResult(entries: entries, scannedRoots: roots);
}