[−][src]Struct simple_libc::inotify::Inotify
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]
&mut self,
path: P,
events: Events,
flags: WatchFlags
) -> Result<Watch>
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]
&mut self,
path: P,
events: Events,
flags: WatchFlags
) -> Result<Watch>
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]
&mut self,
path: P,
events: Events,
flags: WatchFlags
) -> Result<Watch>
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
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]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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>,