Struct inotify::Event [] [src]

pub struct Event<'a> {
    pub wd: WatchDescriptor,
    pub mask: EventMask,
    pub cookie: u32,
    pub name: &'a OsStr,
}

An inotify event

A file system event that describes a change that the user previously registered interest in. To watch for events, call Inotify::add_watch. To retrieve events, call Inotify::read_events_blocking or Inotify::read_events.

Fields

Identifies the watch this event originates from

This is the same WatchDescriptor that Inotify::add_watch returned when interest for this event was registered. The WatchDescriptor can be used to remove the watch using Inotify::rm_watch, thereby preventing future events of this type from being created.

Shows what kind of event this is

The various flags that can be set on this mask are defined in the event_mask module. You can check against any flags that are of interest to you by using EventMask::contains.

Connects related events to each other

When a file is renamed, this results two events: MOVED_FROM and MOVED_TO. The cookie field will be the same for both of them, thereby making is possible to connect the event pair.

The name of the file the event originates from

Trait Implementations

impl<'a> Clone for Event<'a>
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl<'a> Debug for Event<'a>
[src]

Formats the value using the given formatter.