MCPcopy Create free account
hub / github.com/bytecodealliance/rustix / add_watch

Function add_watch

src/fs/inotify.rs:74–80  ·  view source on GitHub ↗
(
    inot: Fd,
    path: P,
    flags: inotify::WatchFlags,
)

Source from the content-addressed store, hash-verified

72#[doc(alias = "inotify_add_watch")]
73#[inline]
74pub fn add_watch<P: crate::path::Arg, Fd: AsFd>(
75 inot: Fd,
76 path: P,
77 flags: inotify::WatchFlags,
78) -> io::Result<i32> {
79 path.into_with_c_str(|path| syscalls::inotify_add_watch(inot.as_fd(), path, flags))
80}
81
82/// `inotify_rm_watch(self, wd)`—Removes a watch from this inotify.
83///

Callers 1

test_inotify_iterFunction · 0.85

Calls 3

into_with_c_strMethod · 0.80
inotify_add_watchFunction · 0.50
as_fdMethod · 0.45

Tested by 1

test_inotify_iterFunction · 0.68