[][src]Struct simple_libc::inotify::Inotify

pub struct Inotify { /* fields omitted */ }

Implementations

impl Inotify[src]

pub fn new(flags: InotifyFlags) -> Result<Self>[src]

Construct a new inotify file descriptor with the given options.

pub fn add_watch<P: AsRef<Path>>(
    &mut self,
    path: P,
    events: Events,
    flags: WatchFlags
) -> Result<Watch>
[src]

Add a new watch (or modify an existing watch) for the given file.

pub fn extend_watch<P: AsRef<Path>>(
    &mut self,
    path: P,
    events: Events,
    flags: WatchFlags
) -> Result<Watch>
[src]

Add a new watch for the given file, or extend the watch mask if the watch already exists.

pub fn create_watch<P: AsRef<Path>>(
    &mut self,
    path: P,
    events: Events,
    flags: WatchFlags
) -> Result<Watch>
[src]

Add a new watch for the given file, failing with an error if the event already exists

pub fn rm_watch(&mut self, watch: Watch) -> Result<()>[src]

Remove a previously added watch.

pub fn read_nowait(&mut self) -> Result<Vec<Event>>[src]

Read a list of events from the inotify file descriptor, or return an empty vector if no events are pending.

pub fn read_wait(&mut self) -> Result<Vec<Event>>[src]

Read a list of events from the inotify file descriptor, waiting for an event to occur if none are pending.

Note: The current implementation of this function may not read all of the events from the the inotify file descriptor. If that is necessary for whatever reason, it is recommended to immediately follow a call to read_wait() with a call to read_nowait() and combine the two resulting vectors.

Trait Implementations

impl AsRawFd for Inotify[src]

impl Debug for Inotify[src]

impl Drop for Inotify[src]

Auto Trait Implementations

impl RefUnwindSafe for Inotify

impl Send for Inotify

impl Sync for Inotify

impl Unpin for Inotify

impl UnwindSafe for Inotify

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.