[−][src]Struct inotify_sys::inotify_event
Describes a file system event
From inotify(7):
To determine what events have occurred, an application read(2)s from the inotify file descriptor. If no events have so far occurred, then, assuming a blocking file descriptor, read(2) will block until at least one event occurs (unless interrupted by a signal, in which case the call fails with the error EINTR; see signal(7)).
Each successful read(2) returns a buffer containing one or more of this structure.
Fields
wd: c_intIdentifies the watch for which this event occurs
This is one of the watch descriptors returned by a previous call to
inotify_add_watch().
mask: uint32_tDescribes the type file system event
One of the following bits will be set, to identify the type of event:
IN_ACCESSIN_ATTRIBIN_CLOSE_NOWRITEIN_CLOSE_WRITEIN_CREATEIN_DELETEIN_DELETE_SELFIN_IGNOREDIN_MODIFYIN_MOVED_FROMIN_MOVED_TOIN_MOVE_SELFIN_OPENIN_Q_OVERFLOWIN_UNMOUNT
Some constants cover multiple bits, and can be used for a less precise check of the event type:
In addition, the IN_ISDIR bit can be set.
A number that connects related events
Currently used only for rename events. A related pair of
IN_MOVED_FROM and IN_MOVED_TO events will have the same,
non-zero, cookie. For all other events, cookie is 0.
len: uint32_tThe length of name
Used to determine the size of this structure. When name
isn't present (name is only present when an event occurs
for a file inside a watched directory), it is 0. When name
is present, it counts all of name's bytes, including \0.
The
namefield is present only when an event is returned for a file inside a watched directory; it identifies the file pathname relative to the watched directory. This pathname is null-terminated, and may include further null bytes ('\0') to align subsequent reads to a suitable address boundary.
The name field has been ommited in this struct's definition.
Trait Implementations
impl Clone for inotify_event[src]
fn clone(&self) -> inotify_event[src]
fn clone_from(&mut self, source: &Self)1.0.0[src]
impl Copy for inotify_event[src]
impl Debug for inotify_event[src]
Auto Trait Implementations
impl Send for inotify_event
impl Unpin for inotify_event
impl Sync for inotify_event
impl UnwindSafe for inotify_event
impl RefUnwindSafe for inotify_event
Blanket Implementations
impl<T> ToOwned for T where
T: Clone, [src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
fn to_owned(&self) -> T[src]
fn clone_into(&self, target: &mut T)[src]
impl<T, U> Into<U> for T where
U: From<T>, [src]
U: From<T>,
impl<T> From<T> for T[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>, [src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>, [src]
U: TryFrom<T>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>[src]
impl<T> BorrowMut<T> for T where
T: ?Sized, [src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T[src]
impl<T> Borrow<T> for T where
T: ?Sized, [src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized, [src]
T: 'static + ?Sized,