Function nc::inotify_rm_watch [−][src]
Expand description
Remove an existing watch from an inotify instance.
let ret = nc::inotify_init1(nc::IN_NONBLOCK | nc::IN_CLOEXEC);
assert!(ret.is_ok());
let fd = ret.unwrap();
let path = "/etc/passwd";
let ret = nc::inotify_add_watch(fd, path, nc::IN_MODIFY);
assert!(ret.is_ok());
let wd = ret.unwrap();
let ret = nc::inotify_rm_watch(fd, wd);
assert!(ret.is_ok());
assert!(nc::close(fd).is_ok());