pub fn walk_files_for_picker(root: &Path) -> Vec<(PathBuf, Option<Metadata>)>Expand description
Walk root recursively (BFS) and return the absolute paths
of every regular file (with its metadata), capped at
FILE_PICKER_MAX_ENTRIES.
Uses the parallel, gitignore-aware ignore walker (the one
lattice-multibuffer::search uses): dotfiles are skipped (hidden),
.gitignore / .ignore / global + parent ignores are honoured, and the
build / VCS directories (.git, target, node_modules, dist,
.cache) are pruned even outside a git checkout. Symlinks aren’t followed.
Each file’s metadata is gathered during the walk (reusing the walk’s own
stat) so a source’s init need not run a second sequential stat pass —
that pass was the bulk of the first-open latency on a large tree.
Errors are silently absorbed (unreadable directories show up as gaps in the listing); the picker UX prefers “some results” over a hard failure when the workspace has a permission pocket somewhere.