watchdog.observers.polling#
- module:
watchdog.observers.polling
- synopsis:
Polling emitter implementation.
- author:
yesudeep@google.com (Yesudeep Mangalapilly)
- author:
Mickaël Schoentgen <contact@tiger-222.fr>
Classes#
- class watchdog.observers.polling.PollingEmitter(event_queue: EventQueue, watch: ObservedWatch, *, timeout: float = 1.0, event_filter: list[type[FileSystemEvent]] | None = None, stat: Callable[[str], os.stat_result] = <built-in function stat>, listdir: Callable[[str | None], Iterator[os.DirEntry]] = <built-in function scandir>)[source]#
Bases:
EventEmitterPlatform-independent emitter that polls a directory to detect file system changes.
- class watchdog.observers.polling.PollingObserver(*, timeout: float = 1.0)[source]#
Bases:
BaseObserverPlatform-independent observer that polls a directory to detect file system changes.
- class watchdog.observers.polling.PollingObserverVFS(stat: Callable[[str], os.stat_result], listdir: Callable[[str | None], Iterator[os.DirEntry]], *, polling_interval: int = 1)[source]#
Bases:
BaseObserverFile system independent observer that polls a directory to detect changes.
- __init__(stat: Callable[[str], os.stat_result], listdir: Callable[[str | None], Iterator[os.DirEntry]], *, polling_interval: int = 1) None[source]#
- Parameters:
stat – stat function. See
os.statfor details.listdir – listdir function. See
os.scandirfor details.polling_interval (int) – interval in seconds between polling the file system.