Файловый менеджер - Редактировать - /home/digitalm/venv/lib/python3.7/site-packages/watchdog/observers/__pycache__/fsevents.cpython-37.pyc
Назад
B �P�g7 � @ s� d Z ddlmZ ddlZddlZddlZddlZddlZddlZ ddl mZmZm Z mZmZmZmZmZmZmZ ddlmZmZmZmZ ddlmZ e�d�ZG dd � d e�ZG d d� de�ZdS )u� :module: watchdog.observers.fsevents :synopsis: FSEvents based emitter implementation. :author: yesudeep@google.com (Yesudeep Mangalapilly) :author: contact@tiger-222.fr (Mickaël Schoentgen) :platforms: macOS � )�annotationsN) �DirCreatedEvent�DirDeletedEvent�DirModifiedEvent� DirMovedEvent�FileCreatedEvent�FileDeletedEvent�FileModifiedEvent�FileMovedEvent�generate_sub_created_events�generate_sub_moved_events)�DEFAULT_EMITTER_TIMEOUT�DEFAULT_OBSERVER_TIMEOUT�BaseObserver�EventEmitter)�DirectorySnapshotZfseventsc s� e Zd ZdZedf� fdd� Zdd� Zdd� Zd d � Zdd� Z d d� Z dd� Zdd� Zdd� Z edd� �Zdd� Zdd� Zdd� Zdd� Zdd � Z� ZS )!�FSEventsEmittera5 macOS FSEvents Emitter class. :param event_queue: The event queue to fill with events. :param watch: A watch object representing the directory to monitor. :type watch: :class:`watchdog.observers.api.ObservedWatch` :param timeout: Read events blocking timeout (in seconds). :param suppress_history: The FSEvents API may emit historic events up to 30 sec before the watch was started. When ``suppress_history`` is ``True``, those events will be suppressed by creating a directory snapshot of the watched path before starting the stream as a reference to suppress old events. Warning: This may result in significant memory usage in case of a large number of items in the watched path. :type timeout: ``float`` Fc sZ t � �|||� t� | _|| _d| _d | _t�� | _ t j�t j� t j�| jj���| _d S )Ng )�super�__init__�set�_fs_view�suppress_history�_start_time�_starting_state� threading�Lock�_lock�os�path�realpath�abspath� expanduser�watch�_absolute_watch_path)�selfZevent_queuer"