scan method

Future<ScanResult> scan({
  1. required List<String> roots,
  2. int maxDepth = 6,
})

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);
}