[][src]Function inotify_sys::inotify_add_watch

pub unsafe extern "C" fn inotify_add_watch(
    fd: c_int,
    pathname: *const c_char,
    mask: uint32_t
) -> c_int

Adds or updates an inotify watch

Adds an item to the watch list of an inotify instance, or modifies an item on that list. This function takes the following arguments:

The following flags in mask control the type of events to watch for:

The following constants can be used as shortcuts to set multiple event flags:

In addition, the following flags can be set to control the behaviors of the watch and this function:

The function returns -1 if an error occured. Otherwise, it returns a watch descriptor that can be used to remove the watch using inotify_rm_watch or identify the watch via inotify_event's [wd`] field.

Please refer to the man page for additional details.