pub fn collect_files(root: &Path, file_type: Option<&str>) -> Vec<PathBuf>Expand description
Walk a directory tree in parallel and collect file paths.
Respects .gitignore rules and skips hidden files and directories.
Collects all files — the chunking phase decides whether to use
tree-sitter (known extensions) or sliding-window fallback (unknown).
When file_type is Some, only files matching that type (using
ripgrep’s built-in type database, e.g. “rust”, “python”, “js”) are
collected.
Uses the ignore crate’s parallel walker for multi-threaded traversal.