A [futures] friendly [inotify] wrapper for [fibers] crate.
Watches /tmp
directory:
```rust use fibers::{Executor, InPlaceExecutor, Spawn}; use fibers_inotify::{InotifyService, WatchMask}; use futures::{Future, Stream};
let inotifyservice = InotifyService::new(); let inotifyhandle = inotify_service.handle();
let mut executor = InPlaceExecutor::new().unwrap(); executor.spawn(inotifyservice.maperr(|e| panic!("{}", e)));
let fiber = executor.spawnmonitor( inotifyhandle .watch("/tmp/", WatchMask::CREATE | WatchMask::DELETE) .foreach(|event| Ok(println!("# EVENT: {:?}", event))) .maperr(|e| panic!("{}", e)), );
let _ = executor.run_fiber(fiber).unwrap(); ```