Skip to main content

watch_blocking

Function watch_blocking 

Source
pub fn watch_blocking<F>(watcher: &mut FileWatcher, callback: F)
where F: FnMut(&[PathBuf]) -> bool,
Expand description

Polls for file changes in a blocking loop, invoking callback with changed paths.

The loop is bounded by MAX_WATCH_ITERATIONS to prevent runaway execution. Returns when the callback returns false or the iteration limit is reached.