Crate fwatcher [−] [src]
Auto run command when some files changed.
Usage
Dependencies in your project's Cargo.toml
:
[dependencies]
glob = "0.2"
notify = "4.0"
fwatcher = "*"
Example
extern crate glob; extern crate fwatcher; use fwatcher::Fwatcher; use glob::Pattern; use std::path::PathBuf; use std::time::Duration; fn main() { let dirs =vec![PathBuf::from("src")]; let patterns = vec![Pattern::new("**/*.py").unwrap()]; let interval = Duration::new(1, 0); let restart = false; let cmd = vec!["pytest".to_string()]; let mut fwatcher = Fwatcher::new(dirs, patterns, interval, restart, cmd); fwatcher.run(); }
Structs
Fwatcher |
a struct save |