Qore fsevent Module ..
|
The fsevent
module provides a Qore wrapper around the Efsw library by MartÃn Lucas Golini.
This module is released under a choice of two licenses:
fsevent
monitors the file system asynchronously for changes to files and directories by watching a list of specified paths, and raises events when a directory or file changes.
It supports watching directories recursively, optionally tracking entire subdirectory trees.
It currently supports the following platforms:
If any of the backend fails to start by any reason, it will fallback to the OS-independent implementation
Also included with the binary fsevent module:
See AbstractFsWatcher for a full reference including a simple example.
Windows implementations can't follow symlinks (followSymlinks() and allowOutOfScopeLinks() are ignored).
The kqueue
implementation is limited by the maximun number of file descriptors allowed per process by the OS, in the case of reaching the file descriptors limit, it will fallback to the generic file watcher.
The generic watcher relies on the inode information to detect file and directories renames/moves. Since Windows has no concept of inodes, there is no current reliable way of determining file/directory movement on Windows without help from the Windows API (this is replaced with Add/Delete events).
Linux versions below 2.6.13 are not supported, since inotify wasn't implemented yet.
The OS-independent watcher and Kqueue keep a cache of the directory structures to be able to detect changes in the directories. This entails memory overhead for these backends.