Function rustix::fs::inotify::inotify_add_watch
source · pub fn inotify_add_watch<P: Arg>(
inot: BorrowedFd<'_>,
path: P,
flags: WatchFlags,
) -> Result<i32>
Expand description
inotify_add_watch(self, path, flags)
—Adds a watch to inotify.
This registers or updates a watch for the filesystem path path
and returns a watch descriptor corresponding to this watch.
Note: Due to the existence of hardlinks, providing two different paths to this method may result in it returning the same watch descriptor. An application should keep track of this externally to avoid logic errors.