Skip to main content

walk

Function walk 

Source
pub fn walk<F>(root: &Path, config: &SearchConfig, emit: F) -> Outcome
where F: FnMut(Vec<Entry>, Outcome) -> bool,
Expand description

Walk root for datasets, handing batches to emit as they are found.

emit returns false to abandon the walk — the caller has moved on, and there is no reason to keep reading a filesystem for an answer nobody is waiting for.

This blocks and touches the filesystem, so it must never be called from the thread drawing the screen.