Struct libuv::handles::fs_event::FsEventHandle
source · pub struct FsEventHandle { /* private fields */ }
Expand description
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§
source§impl FsEventHandle
impl FsEventHandle
sourcepub fn new(loop: &Loop) -> Result<FsEventHandle>
pub fn new(loop: &Loop) -> Result<FsEventHandle>
Create and initialize a fs event handle
sourcepub fn start<CB: Into<FsEventCB<'static>>>(
&mut self,
path: &str,
flags: FsEventFlags,
cb: CB
) -> Result<(), Box<dyn Error>>
pub fn start<CB: Into<FsEventCB<'static>>>( &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.
Trait Implementations§
source§impl Clone for FsEventHandle
impl Clone for FsEventHandle
source§fn clone(&self) -> FsEventHandle
fn clone(&self) -> FsEventHandle
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more