
    $g                        d Z ddlmZ ddlZddlZddlmZmZ ddlm	Z	m
Z
 erddlmZ  G d de          Zdd
Z e            ZdgZdS )u  :module: watchdog.observers
:synopsis: Observer that picks a native implementation if available.
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:author: contact@tiger-222.fr (Mickaël Schoentgen)

Classes
=======
.. autoclass:: Observer
   :members:
   :show-inheritance:
   :inherited-members:

Observer thread that schedules watching directories and dispatches
calls to event handlers.

You can also import platform specific classes directly and use it instead
of :class:`Observer`.  Here is a list of implemented observer classes.:

============== ================================ ==============================
Class          Platforms                        Note
============== ================================ ==============================
|Inotify|      Linux 2.6.13+                    ``inotify(7)`` based observer
|FSEvents|     macOS                            FSEvents based observer
|Kqueue|       macOS and BSD with kqueue(2)     ``kqueue(2)`` based observer
|WinApi|       Microsoft Windows                Windows API-based observer
|Polling|      Any                              fallback implementation
============== ================================ ==============================

.. |Inotify|     replace:: :class:`.inotify.InotifyObserver`
.. |FSEvents|    replace:: :class:`.fsevents.FSEventsObserver`
.. |Kqueue|      replace:: :class:`.kqueue.KqueueObserver`
.. |WinApi|      replace:: :class:`.read_directory_changes.WindowsApiObserver`
.. |Polling|     replace:: :class:`.polling.PollingObserver`

    )annotationsN)TYPE_CHECKINGProtocol)UnsupportedLibcErrorplatform)BaseObserverc                      e Zd Zddd	dZdS )
ObserverType.)timeoutr   floatreturnr   c                   d S )N )selfr   s     [/var/www/html/netbox-4.1.3/venv/lib/python3.11/site-packages/watchdog/observers/__init__.py__call__zObserverType.__call__2   s          N)r   r   r   r   )__name__
__module____qualname__r   r   r   r   r
   r
   1   s%        +.DDDDDDDDr   r
   r   c                 L   t          j                    r:t          j        t                    5  ddlm}  | cd d d            S # 1 swxY w Y   nt          j                    r`	 ddlm	} |S # t          $ rJ 	 ddlm} t          j        dd           |cY S # t          $ r t          j        dd           Y nw xY wY naw xY wt          j                    r/	 dd	lm} |S # t          $ r t          j        d
d           Y nw xY wt          j                    rddlm} |S ddlm} |S )Nr   )InotifyObserver)FSEventsObserver)KqueueObserverz.Failed to import fsevents. Fall back to kqueue   )
stacklevelz;Failed to import fsevents and kqueue. Fall back to polling.)WindowsApiObserverz@Failed to import `read_directory_changes`. Fall back to polling.)PollingObserver)r   is_linux
contextlibsuppressr   watchdog.observers.inotifyr   	is_darwinwatchdog.observers.fseventsr   	Exceptionwatchdog.observers.kqueuer   warningswarn
is_windows)watchdog.observers.read_directory_changesr   is_bsdwatchdog.observers.pollingr   )r   r   r   r   r   s        r   _get_observer_clsr-   5   s     !566 	# 	#BBBBBB"	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 	# 
			 	$DDDDDD $#  	& 	& 	&&DDDDDD N[\]]]]%%%%	  k k k[hijjjjjjkjj		& 
			 
	&TTTTTT &%  	l 	l 	lM\ijkkkkkk	l 
		 <<<<<<::::::sY   AA	A"A* *
B>5B;B> B85B>7B88B>=B>C  D ?D Observer)r   r
   )__doc__
__future__r   r    r'   typingr   r   watchdog.utilsr   r   watchdog.observers.apir   r
   r-   r.   __all__r   r   r   <module>r5      s   " "H # " " " " "      * * * * * * * * 9 9 9 9 9 9 9 9 4333333E E E E E8 E E E! ! ! !H ,r   