[][src]Struct libuv::handles::fs_event::FsEventHandle

pub struct FsEventHandle { /* fields omitted */ }

FS Event handles allow the user to monitor a given path for changes, for example, if the file was renamed or there was a generic change in it. This handle uses the best backend for the job on each platform.

Note: For AIX, the non default IBM bos.ahafs package has to be installed. The AIX Event Infrastructure file system (ahafs) has some limitations:

  • ahafs tracks monitoring per process and is not thread safe. A separate process must be spawned for each monitor for the same event.
  • Events for file modification (writing to a file) are not received if only the containing folder is watched.

See documentation for more details.

The z/OS file system events monitoring infrastructure does not notify of file creation/deletion within a directory that is being monitored. See the IBM Knowledge centre for more details.

Implementations

impl FsEventHandle[src]

pub fn new(r#loop: &Loop) -> Result<FsEventHandle>[src]

Create and initialize a fs event handle

pub fn start<CB: Into<FsEventCB<'static>>>(
    &mut self,
    path: &str,
    flags: FsEventFlags,
    cb: CB
) -> Result<(), Box<dyn Error>>
[src]

Start the handle with the given callback, which will watch the specified path for changes.

Note: Currently the only supported flag is RECURSIVE and only on OSX and Windows.

pub fn stop(&mut self) -> Result<()>[src]

Stop the handle, the callback will no longer be called.

pub fn getpath(&self) -> Result<String>[src]

Get the path being monitored by the handle.

Trait Implementations

impl Clone for FsEventHandle[src]

impl Copy for FsEventHandle[src]

impl From<FsEventHandle> for Handle[src]

impl HandleTrait for FsEventHandle[src]

impl ToHandle for FsEventHandle[src]

impl TryFrom<Handle> for FsEventHandle[src]

type Error = ConversionError

The type returned in the event of a conversion error.

Auto Trait Implementations

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> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.