Module Expr Str ImportFrom alias ImportFrom alias If BoolOpAnd UnaryOpNot Call AttributeLoad NameLoad attr UnaryOpNot Call AttributeLoad NameLoad attr body Raise NameLoad Import alias Import alias Import alias Import alias Import alias If CompareLt AttributeLoad NameLoad attr TupleLoad Num Num Num body Import alias identifier orelse Import alias ImportFrom alias ImportFrom alias alias alias alias ImportFrom alias ImportFrom alias alias alias alias alias alias alias alias alias alias alias Assign NameStore Num Assign NameStore Num If Call AttributeLoad NameLoad attr body Assign NameStore NameLoad orelse Assign NameStore BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr Assign NameStore BinOpBitOr BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore BinOpBitOr BinOpBitOr BinOpBitOr BinOpBitOr BinOpBitOr BinOpBitOr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam defaults body Expr Str Return BinOpBitAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Assign NameStore AttributeLoad NameLoad attr Return BoolOpOr BinOpBitAnd NameLoad AttributeLoad NameLoad attr BinOpBitAnd NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpBitAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return BinOpBitAnd AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Expr Str With AttributeLoad NameLoad attr body Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str With AttributeLoad NameLoad attr body Return Call NameLoad Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str With AttributeLoad NameLoad attr body Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str With AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str With AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad Return Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str With AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad If UnaryOpNot Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str With AttributeLoad NameLoad attr body Assign NameStore Call NameLoad NameLoad If Call AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str With AttributeLoad NameLoad attr body For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr Assign AttributeStore NameLoad attr ListLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return SubscriptLoad AttributeLoad NameLoad attr Index NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Return CompareIn NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad Assign SubscriptStore AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Delete SubscriptDel AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Delete SubscriptDel AttributeLoad NameLoad attr Index AttributeLoad NameLoad attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword NameLoad decorator_list FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str Return AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr handlers ExceptHandler type NameLoad body Pass decorator_list FunctionDef arguments args NameParam defaults body Return TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list NameLoad FunctionDef arguments args NameParam NameParam defaults body Return CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam defaults body Return CompareNotEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return Call NameLoad AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam defaults body Return BinOpMod Str TupleLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr Call NameLoad FunctionDef arguments args NameParam NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Str TryExcept body Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Pass orelse Raise decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr AttributeLoad NameLoad attr orelse If CompareEq AttributeLoad NameLoad attr NameLoad body Expr Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam defaults body Expr Str If NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Assign NameStore BinOpSub NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad For NameStore AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str Assign NameStore Call NameLoad Assign NameStore Call NameLoad Assign NameStore Call NameLoad For NameStore NameLoad body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad NameLoad attr Assign NameStore AttributeLoad NameLoad attr If Call NameLoad NameLoad body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse If Call NameLoad NameLoad body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse If Call NameLoad NameLoad body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse If Call NameLoad NameLoad body If AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr NameLoad Return TupleLoad NameLoad NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad handlers ExceptHandler type NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad Return TryExcept body Assign NameStore Call NameLoad Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr If NameLoad body Assign NameStore Call NameLoad NameLoad NameLoad If AttributeLoad AttributeLoad NameLoad attr attr body For NameStore Call AttributeLoad NameLoad attr body Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad body If NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad orelse Expr Call AttributeLoad NameLoad attr Call NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Str Return Call AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults body Expr Str With AttributeLoad NameLoad attr body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign TupleStore NameStore NameStore NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr AttributeLoad AttributeLoad NameLoad attr attr Assign NameStore AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad If BoolOpOr NameLoad NameLoad NameLoad body For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad For NameStore NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body If CompareEq AttributeLoad NameLoad attr AttributeLoad NameLoad attr body Pass orelse Raise decorator_list FunctionDef arguments args NameParam defaults body With AttributeLoad NameLoad attr body Expr Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad AttributeLoad NameLoad attr attr decorator_list decorator_list ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list decorator_list
N/A N/A 
:module: watchdog.observers.kqueue
:synopsis: ``kqueue(2)`` based emitter implementation.
:author: yesudeep@google.com (Yesudeep Mangalapilly)
:platforms: Mac OS X and BSD with kqueue(2).

.. WARNING:: kqueue is a very heavyweight way to monitor file systems.
             Each kqueue-detected directory modification triggers
             a full directory scan. Traversing the entire directory tree
             and opening file descriptors for all files will create
             performance problems. We need to find a way to re-scan
             only those directories which report changes and do a diff
             between two sub-DirectorySnapshots perhaps.

.. ADMONITION:: About ``select.kqueue`` and Python versions

    * Python 2.5 does not ship with ``select.kqueue``
    * Python 2.6 ships with a broken ``select.kqueue`` that cannot take
      multiple events in the event list passed to ``kqueue.control``.
    * Python 2.7 ships with a working ``select.kqueue``
      implementation.

    I have backported the Python 2.7 implementation to Python 2.5 and 2.6
    in the ``select_backport`` package available on PyPI.

.. ADMONITION:: About OS X performance guidelines

    Quote from the `Mac OS X File System Performance Guidelines`_:

        "When you only want to track changes on a file or directory, be sure to
        open it using the ``O_EVTONLY`` flag. This flag prevents the file or
        directory from being marked as open or in use. This is important
        if you are tracking files on a removable volume and the user tries to
        unmount the volume. With this flag in place, the system knows it can
        dismiss the volume. If you had opened the files or directories without
        this flag, the volume would be marked as busy and would not be
        unmounted."

    ``O_EVTONLY`` is defined as ``0x8000`` in the OS X header files.
    More information here: http://www.mlsite.net/blog/?p=2312

Classes
-------
.. autoclass:: KqueueEmitter
   :members:
   :show-inheritance:

Collections and Utility Classes
-------------------------------
.. autoclass:: KeventDescriptor
   :members:
   :show-inheritance:

.. autoclass:: KeventDescriptorSet
   :members:
   :show-inheritance:

.. _Mac OS X File System Performance Guidelines: http://developer.apple.com/library/ios/#documentation/Performance/Conceptual/FileSystem/Articles/TrackingChanges.html#//apple_ref/doc/uid/20001993-CJBJFIDD

 __future__ with_statement watchdog.utils platform N/A N/A N/A N/A N/A platform is_bsd N/A N/A N/A platform is_darwin N/A N/A ImportError N/A threading N/A errno N/A sys N/A stat N/A os N/A N/A N/A sys version_info N/A 2 7 0 N/A N/A select_backport select N/A N/A select pathtools.path absolute_path watchdog.observers.api BaseObserver EventEmitter DEFAULT_OBSERVER_TIMEOUT DEFAULT_EMITTER_TIMEOUT watchdog.utils.dirsnapshot DirectorySnapshot watchdog.events DirMovedEvent DirDeletedEvent DirCreatedEvent DirModifiedEvent FileMovedEvent FileDeletedEvent FileCreatedEvent FileModifiedEvent EVENT_TYPE_MOVED EVENT_TYPE_DELETED EVENT_TYPE_CREATED N/A MAX_EVENTS 4096 N/A O_EVTONLY 32768 N/A N/A N/A platform is_darwin N/A N/A WATCHDOG_OS_OPEN_FLAGS O_EVTONLY N/A N/A WATCHDOG_OS_OPEN_FLAGS N/A N/A os O_RDONLY N/A os O_NONBLOCK N/A WATCHDOG_KQ_FILTER N/A select KQ_FILTER_VNODE N/A WATCHDOG_KQ_EV_FLAGS N/A N/A N/A select KQ_EV_ADD N/A select KQ_EV_ENABLE N/A select KQ_EV_CLEAR N/A WATCHDOG_KQ_FFLAGS N/A N/A N/A N/A N/A N/A N/A select KQ_NOTE_DELETE N/A select KQ_NOTE_WRITE N/A select KQ_NOTE_EXTEND N/A select KQ_NOTE_ATTRIB N/A select KQ_NOTE_LINK N/A select KQ_NOTE_RENAME N/A select KQ_NOTE_REVOKE is_deleted N/A N/A kev N/A N/A N/A Determines whether the given kevent represents deletion. N/A N/A N/A kev fflags N/A select KQ_NOTE_DELETE N/A is_modified N/A N/A kev N/A N/A N/A Determines whether the given kevent represents modification. N/A fflags N/A kev fflags N/A N/A N/A fflags N/A select KQ_NOTE_EXTEND N/A fflags N/A select KQ_NOTE_WRITE N/A is_attrib_modified N/A N/A kev N/A N/A N/A Determines whether the given kevent represents attribute modification. N/A N/A N/A kev fflags N/A select KQ_NOTE_ATTRIB N/A is_renamed N/A N/A kev N/A N/A N/A Determines whether the given kevent represents movement. N/A N/A N/A kev fflags N/A select KQ_NOTE_RENAME N/A KeventDescriptorSet N/A object N/A N/A 
    Thread-safe kevent descriptor collection.
     __init__ N/A N/A self N/A N/A N/A N/A self _descriptors N/A set N/A N/A self _descriptor_for_path N/A dict N/A N/A self _descriptor_for_fd N/A dict N/A N/A self _kevents N/A list N/A N/A self _lock N/A N/A threading Lock N/A kevents N/A N/A self N/A N/A N/A 
        List of kevents monitored.
         N/A N/A self _lock N/A N/A N/A self _kevents N/A property paths N/A N/A self N/A N/A N/A 
        List of paths for which kevents have been created.
         N/A N/A self _lock N/A N/A N/A list N/A N/A N/A self _descriptor_for_path keys N/A property get_for_fd N/A N/A self fd N/A N/A N/A 
        Given a file descriptor, returns the kevent descriptor object
        for it.

        :param fd:
            OS file descriptor.
        :type fd:
            ``int``
        :returns:
            A :class:`KeventDescriptor` object.
         N/A N/A self _lock N/A N/A N/A N/A self _descriptor_for_fd N/A fd N/A get N/A N/A self path N/A N/A N/A 
        Obtains a :class:`KeventDescriptor` object for the specified path.

        :param path:
            Path for which the descriptor will be obtained.
         N/A N/A self _lock N/A N/A path N/A absolute_path path N/A N/A N/A self _get path N/A __contains__ N/A N/A self path N/A N/A N/A 
        Determines whether a :class:`KeventDescriptor has been registered
        for the specified path.

        :param path:
            Path for which the descriptor will be obtained.
         N/A N/A self _lock N/A N/A path N/A absolute_path path N/A N/A N/A self _has_path path N/A add N/A N/A self path is_directory N/A N/A N/A 
        Adds a :class:`KeventDescriptor` to the collection for the given
        path.

        :param path:
            The path for which a :class:`KeventDescriptor` object will be
            added.
        :param is_directory:
            ``True`` if the path refers to a directory; ``False`` otherwise.
        :type is_directory:
            ``bool``
         N/A N/A self _lock N/A N/A path N/A absolute_path path N/A N/A N/A N/A self _has_path path N/A N/A N/A N/A self _add_descriptor N/A KeventDescriptor path is_directory N/A remove N/A N/A self path N/A N/A N/A 
        Removes the :class:`KeventDescriptor` object for the given path
        if it already exists.

        :param path:
            Path for which the :class:`KeventDescriptor` object will be
            removed.
         N/A N/A self _lock N/A N/A path N/A absolute_path path N/A N/A N/A self _has_path path N/A N/A N/A N/A self _remove_descriptor N/A N/A self _get path N/A clear N/A N/A self N/A N/A N/A 
        Clears the collection and closes all open descriptors.
         N/A N/A self _lock N/A N/A descriptor N/A self _descriptors N/A N/A N/A N/A descriptor close N/A N/A N/A N/A self _descriptors clear N/A N/A N/A N/A self _descriptor_for_fd clear N/A N/A N/A N/A self _descriptor_for_path clear N/A N/A self _kevents N/A N/A _get N/A N/A self path N/A N/A N/A Returns a kevent descriptor for a given path. N/A N/A N/A self _descriptor_for_path N/A path N/A _has_path N/A N/A self path N/A N/A N/A Determines whether a :class:`KeventDescriptor` for the specified
   path exists already in the collection. N/A N/A path N/A self _descriptor_for_path N/A _add_descriptor N/A N/A self descriptor N/A N/A N/A 
        Adds a descriptor to the collection.

        :param descriptor:
            An instance of :class:`KeventDescriptor` to be added.
         N/A N/A N/A N/A self _descriptors add descriptor N/A N/A N/A N/A self _kevents append N/A descriptor kevent N/A N/A N/A self _descriptor_for_path N/A N/A descriptor path descriptor N/A N/A N/A self _descriptor_for_fd N/A N/A descriptor fd descriptor N/A _remove_descriptor N/A N/A self descriptor N/A N/A N/A 
        Removes a descriptor from the collection.

        :param descriptor:
            An instance of :class:`KeventDescriptor` to be removed.
         N/A N/A N/A N/A self _descriptors remove descriptor N/A N/A N/A self _descriptor_for_fd N/A N/A descriptor fd N/A N/A N/A self _descriptor_for_path N/A N/A descriptor path N/A N/A N/A N/A self _kevents remove N/A descriptor kevent N/A N/A N/A descriptor close N/A N/A KeventDescriptor N/A object N/A N/A 
    A kevent descriptor convenience data structure to keep together:

        * kevent
        * directory status
        * path
        * file descriptor

    :param path:
        Path string for which a kevent descriptor will be created.
    :param is_directory:
        ``True`` if the path refers to a directory; ``False`` otherwise.
    :type is_directory:
        ``bool``
     __init__ N/A N/A self path is_directory N/A N/A N/A N/A self _path N/A absolute_path path N/A N/A self _is_directory is_directory N/A N/A self _fd N/A N/A os open path WATCHDOG_OS_OPEN_FLAGS N/A N/A self _kev N/A N/A select kevent N/A self _fd filter WATCHDOG_KQ_FILTER flags WATCHDOG_KQ_EV_FLAGS fflags WATCHDOG_KQ_FFLAGS N/A fd N/A N/A self N/A N/A N/A OS file descriptor for the kevent descriptor. N/A N/A self _fd N/A property path N/A N/A self N/A N/A N/A The path associated with the kevent descriptor. N/A N/A self _path N/A property kevent N/A N/A self N/A N/A N/A The kevent object associated with the kevent descriptor. N/A N/A self _kev N/A property is_directory N/A N/A self N/A N/A N/A Determines whether the kevent descriptor refers to a directory.

        :returns:
            ``True`` or ``False``
         N/A N/A self _is_directory N/A property close N/A N/A self N/A N/A N/A 
        Closes the file descriptor associated with a kevent descriptor.
         N/A N/A N/A N/A N/A os close N/A self fd N/A N/A N/A OSError N/A N/A N/A key N/A N/A self N/A N/A N/A N/A N/A self path N/A self is_directory N/A property __eq__ N/A N/A self descriptor N/A N/A N/A N/A N/A self key N/A descriptor key N/A __ne__ N/A N/A self descriptor N/A N/A N/A N/A N/A self key N/A descriptor key N/A __hash__ N/A N/A self N/A N/A N/A N/A hash N/A self key N/A __repr__ N/A N/A self N/A N/A N/A N/A <KeventDescriptor: path=%s, is_directory=%s> N/A N/A self path N/A self is_directory N/A N/A KqueueEmitter N/A EventEmitter N/A N/A 
    kqueue(2)-based event emitter.

    .. ADMONITION:: About ``kqueue(2)`` behavior and this implementation

              ``kqueue(2)`` monitors file system events only for
              open descriptors, which means, this emitter does a lot of
              book-keeping behind the scenes to keep track of open
              descriptors for every entry in the monitored directory tree.

              This also means the number of maximum open file descriptors
              on your system must be increased **manually**.
              Usually, issuing a call to ``ulimit`` should suffice::

                  ulimit -n 1024

              Ensure that you pick a number that is larger than the
              number of files you expect to be monitored.

              ``kqueue(2)`` does not provide enough information about the
              following things:

              * The destination path of a file or directory that is renamed.
              * Creation of a file or directory within a directory; in this
                case, ``kqueue(2)`` only indicates a modified event on the
                parent directory.

              Therefore, this emitter takes a snapshot of the directory
              tree when ``kqueue(2)`` detects a change on the file system
              to be able to determine the above information.

    :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).
    :type timeout:
        ``float``
     __init__ N/A N/A self event_queue watch timeout N/A DEFAULT_EMITTER_TIMEOUT N/A N/A N/A N/A EventEmitter __init__ self event_queue watch timeout N/A N/A self _kq N/A N/A select kqueue N/A N/A self _lock N/A N/A threading RLock N/A N/A self _descriptors N/A KeventDescriptorSet walker_callback N/A N/A path stat_info self N/A self N/A N/A N/A N/A self _register_kevent path N/A N/A stat S_ISDIR N/A stat_info st_mode N/A N/A N/A self _snapshot N/A DirectorySnapshot N/A watch path N/A watch is_recursive walker_callback N/A _register_kevent N/A N/A self path is_directory N/A N/A N/A 
        Registers a kevent descriptor for the given path.

        :param path:
            Path for which a kevent descriptor will be created.
        :param is_directory:
            ``True`` if the path refers to a directory; ``False`` otherwise.
        :type is_directory:
            ``bool``
         N/A N/A N/A N/A N/A N/A self _descriptors add path is_directory N/A N/A N/A OSError N/A e N/A N/A N/A N/A e errno N/A errno ENOENT N/A N/A N/A N/A N/A _unregister_kevent N/A N/A self path N/A N/A N/A 
        Convenience function to close the kevent descriptor for a
        specified kqueue-monitored path.

        :param path:
            Path for which the kevent descriptor will be closed.
         N/A N/A N/A N/A self _descriptors remove path N/A queue_event N/A N/A self event N/A N/A N/A 
        Handles queueing a single event object.

        :param event:
            An instance of :class:`watchdog.events.FileSystemEvent`
            or a subclass.
         N/A N/A N/A EventEmitter queue_event self event N/A N/A N/A event event_type EVENT_TYPE_CREATED N/A N/A N/A N/A self _register_kevent N/A event src_path N/A event is_directory N/A N/A N/A N/A event event_type EVENT_TYPE_MOVED N/A N/A N/A N/A self _unregister_kevent N/A event src_path N/A N/A N/A self _register_kevent N/A event dest_path N/A event is_directory N/A N/A N/A N/A event event_type EVENT_TYPE_DELETED N/A N/A N/A N/A self _unregister_kevent N/A event src_path N/A _queue_dirs_modified N/A N/A self dirs_modified ref_snapshot new_snapshot N/A N/A N/A 
        Queues events for directory modifications by scanning the directory
        for changes.

        A scan is a comparison between two snapshots of the same directory
        taken at two different times. This also determines whether files
        or directories were created, which updated the modified timestamp
        for the directory.
         N/A dirs_modified N/A N/A dir_modified dirs_modified N/A N/A N/A N/A self queue_event N/A DirModifiedEvent dir_modified N/A diff_events N/A new_snapshot ref_snapshot N/A file_created N/A diff_events files_created N/A N/A N/A N/A self queue_event N/A FileCreatedEvent file_created N/A directory_created N/A diff_events dirs_created N/A N/A N/A N/A self queue_event N/A DirCreatedEvent directory_created N/A _queue_events_except_renames_and_dir_modifications N/A N/A self event_list N/A N/A N/A 
        Queues events from the kevent list returned from the call to
        :meth:`select.kqueue.control`.

        .. NOTE:: Queues only the deletions, file modifications,
                  attribute modifications. The other events, namely,
                  file creation, directory modification, file rename,
                  directory rename, directory creation, etc. are
                  determined by comparing directory snapshots.
         N/A files_renamed N/A set N/A dirs_renamed N/A set N/A dirs_modified N/A set N/A kev event_list N/A N/A descriptor N/A N/A N/A self _descriptors get_for_fd N/A kev ident N/A src_path N/A descriptor path N/A N/A is_deleted kev N/A N/A N/A descriptor is_directory N/A N/A N/A N/A self queue_event N/A DirDeletedEvent src_path N/A N/A N/A N/A self queue_event N/A FileDeletedEvent src_path N/A N/A N/A is_attrib_modified kev N/A N/A N/A descriptor is_directory N/A N/A N/A N/A self queue_event N/A DirModifiedEvent src_path N/A N/A N/A N/A self queue_event N/A FileModifiedEvent src_path N/A N/A N/A is_modified kev N/A N/A N/A descriptor is_directory N/A N/A N/A N/A dirs_modified add src_path N/A N/A N/A N/A self queue_event N/A FileModifiedEvent src_path N/A N/A N/A is_renamed kev N/A N/A N/A descriptor is_directory N/A N/A N/A N/A dirs_renamed add src_path N/A N/A N/A N/A files_renamed add src_path N/A N/A files_renamed dirs_renamed dirs_modified N/A _queue_renamed N/A N/A self src_path is_directory ref_snapshot new_snapshot N/A N/A N/A 
        Compares information from two directory snapshots (one taken before
        the rename operation and another taken right after) to determine the
        destination path of the file system object renamed, and adds
        appropriate events to the event queue.
         N/A N/A N/A ref_stat_info N/A N/A ref_snapshot stat_info src_path N/A N/A N/A KeyError N/A N/A is_directory N/A N/A N/A N/A self queue_event N/A DirCreatedEvent src_path N/A N/A N/A self queue_event N/A DirDeletedEvent src_path N/A N/A N/A N/A self queue_event N/A FileCreatedEvent src_path N/A N/A N/A self queue_event N/A FileDeletedEvent src_path N/A N/A N/A N/A dest_path N/A absolute_path N/A N/A new_snapshot path_for_inode N/A ref_stat_info st_ino N/A is_directory N/A N/A event N/A DirMovedEvent src_path dest_path N/A N/A N/A self watch is_recursive N/A N/A sub_event N/A N/A event sub_moved_events N/A N/A N/A N/A self queue_event sub_event N/A N/A N/A self queue_event event N/A N/A N/A N/A self queue_event N/A FileMovedEvent src_path dest_path N/A N/A N/A KeyError N/A N/A is_directory N/A N/A N/A N/A self queue_event N/A DirDeletedEvent src_path N/A N/A N/A N/A self queue_event N/A FileDeletedEvent src_path N/A _read_events N/A N/A self timeout N/A None N/A N/A 
        Reads events from a call to the blocking
        :meth:`select.kqueue.control()` method.

        :param timeout:
            Blocking timeout for reading events.
        :type timeout:
            ``float`` (seconds)
         N/A N/A N/A N/A self _kq control N/A N/A self _descriptors kevents MAX_EVENTS timeout N/A queue_events N/A N/A self timeout N/A N/A N/A 
        Queues events by reading them from a call to the blocking
        :meth:`select.kqueue.control()` method.

        :param timeout:
            Blocking timeout for reading events.
        :type timeout:
            ``float`` (seconds)
         N/A N/A self _lock N/A N/A N/A N/A event_list N/A N/A self _read_events timeout N/A N/A files_renamed dirs_renamed dirs_modified N/A N/A self _queue_events_except_renames_and_dir_modifications event_list N/A new_snapshot N/A DirectorySnapshot N/A N/A self watch path N/A N/A self watch is_recursive N/A ref_snapshot N/A self _snapshot N/A N/A self _snapshot new_snapshot N/A N/A files_renamed dirs_renamed dirs_modified N/A N/A src_path files_renamed N/A N/A N/A N/A self _queue_renamed src_path False ref_snapshot new_snapshot N/A src_path dirs_renamed N/A N/A N/A N/A self _queue_renamed src_path True ref_snapshot new_snapshot N/A N/A N/A self _queue_dirs_modified dirs_modified ref_snapshot new_snapshot N/A N/A N/A OSError N/A e N/A N/A N/A N/A e errno N/A errno EBADF N/A N/A N/A N/A N/A on_thread_stop N/A N/A self N/A N/A N/A N/A self _lock N/A N/A N/A N/A N/A self _descriptors clear N/A N/A N/A N/A self _kq close N/A N/A KqueueObserver N/A BaseObserver N/A N/A 
    Observer thread that schedules watching directories and dispatches
    calls to event handlers.
     __init__ N/A N/A self timeout N/A DEFAULT_OBSERVER_TIMEOUT N/A N/A N/A N/A BaseObserver __init__ self emitter_class KqueueEmitter timeout timeout N/A N/A