Function nc::inotify_rm_watch [−][src]
pub fn inotify_rm_watch(fd: i32, wd: i32) -> Result<(), Errno>
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());