watch

Function watch 

Source
pub fn watch<P, F>(path: P, callback: F) -> Result<FileWatcher>
where P: AsRef<Path>, F: FnMut(&Path) + Send + 'static,
Expand description

Watch a file and call a callback on changes