[−][src]Struct libuv::handles::fs_event::FsEventHandle
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]
&mut self,
path: &str,
flags: FsEventFlags,
cb: CB
) -> Result<(), Box<dyn Error>>
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]
fn clone(&self) -> FsEventHandle
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for FsEventHandle
[src]
impl From<FsEventHandle> for Handle
[src]
fn from(fs_event: FsEventHandle) -> Handle
[src]
impl HandleTrait for FsEventHandle
[src]
fn is_active(&self) -> bool
[src]
fn is_closing(&self) -> bool
[src]
fn close<CB: Into<CloseCB<'static>>>(&mut self, cb: CB)
[src]
fn ref(&mut self)
[src]
fn unref(&mut self)
[src]
fn has_ref(&self) -> bool
[src]
fn send_buffer_size(&mut self, value: i32) -> Result<i32>
[src]
fn recv_buffer_size(&mut self, value: i32) -> Result<i32>
[src]
fn get_fileno(&self) -> Result<OsFile>
[src]
fn get_loop(&self) -> Loop
[src]
fn get_type(&self) -> HandleType
[src]
impl ToHandle for FsEventHandle
[src]
impl TryFrom<Handle> for FsEventHandle
[src]
Auto Trait Implementations
impl RefUnwindSafe for FsEventHandle
impl !Send for FsEventHandle
impl !Sync for FsEventHandle
impl Unpin for FsEventHandle
impl UnwindSafe for FsEventHandle
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> 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> 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>,