scanRepository method

String scanRepository([
  1. String root = '.',
  2. int maxDepth = 4,
  3. int maxLines = 30
])

Implementation

String scanRepository([String root = '.', int maxDepth = 4, int maxLines = 30]) {
  final dir = Directory(root);
  if (!dir.existsSync()) {
    return 'Directory not found: $root';
  }

  final buffer = StringBuffer();
  int lineCount = 0;
  _scanDirectory(dir, '', buffer, 0, maxDepth, maxLines, lineCount);
  return buffer.toString();
}