Ejemplo n.º 1
0
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT,
              stat=default_stat, listdir=os.listdir):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._snapshot = None
     self._lock = threading.Lock()
     self._take_snapshot = lambda: DirectorySnapshot(
         self.watch.path, self.watch.is_recursive, stat=stat, listdir=listdir)
Ejemplo n.º 2
0
    def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
        EventEmitter.__init__(self, event_queue, watch, timeout)

        self._kq = select.kqueue()
        self._lock = threading.RLock()

        # A collection of KeventDescriptor.
        self._descriptors = KeventDescriptorSet()

        def walker_callback(path, stat_info, self=self):
            self._register_kevent(path, stat.S_ISDIR(stat_info.st_mode))

        self._snapshot = DirectorySnapshot(watch.path, watch.is_recursive,
                                           walker_callback)
Ejemplo n.º 3
0
    def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
        EventEmitter.__init__(self, event_queue, watch, timeout)

        self._kq = select.kqueue()
        self._lock = threading.RLock()

        # A collection of KeventDescriptor.
        self._descriptors = KeventDescriptorSet()

        def walker_callback(path, stat_info, self=self):
            self._register_kevent(path, stat.S_ISDIR(stat_info.st_mode))

        self._snapshot = DirectorySnapshot(watch.path,
                                           watch.is_recursive,
                                           walker_callback)
Ejemplo n.º 4
0
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._fsevents = FSEventsQueue(watch.path)
     self._fsevents.start()
Ejemplo n.º 5
0
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._lock = threading.Lock()
     self._handle = None
Ejemplo n.º 6
0
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._lock = threading.Lock()
     self.snapshot = DirectorySnapshot(watch.path, watch.is_recursive)
Ejemplo n.º 7
0
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._lock = threading.Lock()
     self._inotify = None
Ejemplo n.º 8
0
 def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT):
     EventEmitter.__init__(self, event_queue, watch, timeout)
     self._lock = threading.Lock()
     self.snapshot = DirectorySnapshot(watch.path, watch.is_recursive)