Class Filesystem.Monitor.basic
- Description
Basic filesystem monitor.
This module is intended to be used for incremental scanning of a filesystem.
Supports FSEvents on MacOS X and Inotify on Linux to provide low overhead monitoring; other systems use a less efficient polling approach.
- See also
Filesystem.Monitor.symlinks, System.FSEvents, System.Inotify
- Constant
default_file_interval_factor
protectedconstantintFilesystem.Monitor.basic.default_file_interval_factor- Description
The default factor to multiply default_max_dir_check_interval with to get the maximum number of seconds between checks of files.
The value can be changed by calling create().
The value can be overridden for individual files or directories by calling monitor().
Overload this constant to change the default.
- Constant
default_max_dir_check_interval
protectedconstantintFilesystem.Monitor.basic.default_max_dir_check_interval- Description
The default maximum number of seconds between checks of directories in seconds.
This value is multiplied with default_file_interval_factor to get the corresponding default maximum number of seconds for files.
The value can be changed by calling create().
The value can be overridden for individual files or directories by calling monitor().
Overload this constant to change the default.
- Constant
default_stable_time
protectedconstantintFilesystem.Monitor.basic.default_stable_time- Description
The default minimum number of seconds without changes for a change to be regarded as stable (see stable_data_change().
- Variable
backend
protectedPike.BackendFilesystem.Monitor.basic.backend- Description
Backend to use.
If
0(zero) - use the default backend.
- Variable
co_id
protectedmixedFilesystem.Monitor.basic.co_id- Description
Call-out identifier for backend_check() if in nonblocking mode.
- See also
- Variable
monitor_mutex
protectedThread.MutexFilesystem.Monitor.basic.monitor_mutex- Description
Mutex controlling access to monitor_queue.
- Variable
monitor_queue
protectedADT.Heap(<Monitor>) Filesystem.Monitor.basic.monitor_queue- Description
Heap containing active Monitors that need polling.
The heap is sorted on
Monitor()->next_poll.
- Variable
monitors
protectedmapping(string:Monitor) Filesystem.Monitor.basic.monitors- Description
Mapping from monitored path to corresponding Monitor.
The paths are normalized to
canonic_path(path),- Note
All filesystems are handled as if case-sensitive. This should not be a problem for case-insensitive filesystems as long as case is maintained.
- Method
create
Filesystem.Monitor.basic Filesystem.Monitor.basic(int|voidmax_dir_check_interval,int|voidfile_interval_factor,int|voidstable_time)- Description
Create a new monitor.
- Parameter
max_dir_check_interval Override of default_max_dir_check_interval.
- Parameter
file_interval_factor Override of default_file_interval_factor.
- Parameter
stable_time Override of default_stable_time.