"""This module provides a custom polling file system event emitter for the:obj:`watchdog` package that sorts file system events in an order which can be appliedto reproduce the new state from the old state. This is only required for the pollingemitter which uses period directory snapshots and compares them with a:class:`watchdog.utils.dirsnapshot.DirectorySnapshotDiff` to generate file systemevents."""from__future__importannotationsfromtypingimportTYPE_CHECKING,Type,Unionfromwatchdog.utilsimportplatformifTYPE_CHECKING:fromwatchdog.observers.fseventsimportFSEventsObserverfromwatchdog.observers.inotifyimportInotifyObserverfrom.pollingimportOrderedPollingObserver