pub fn add_watch<P: Arg>(
inot: impl AsFd,
path: P,
flags: WatchFlags,
) -> Result<i32>
Available on crate feature
fs
only.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.