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)
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT): EventEmitter.__init__(self, event_queue, watch, timeout) self.wm = pyinotify.WatchManager() self.notifier = pyinotify.Notifier(self.wm, InotifyEventHandler(emitter=self)) self.wm.add_watch(watch.path, mask, rec=watch.is_recursive) self.stopped = threading.Event() self.path = watch.path
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT): EventEmitter.__init__(self, event_queue, watch, timeout) self._lock = threading.Lock() self._directory_handle = get_directory_handle(watch.path, WATCHDOG_FILE_FLAGS) self._buffer = ctypes.create_string_buffer(BUFFER_SIZE)
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() 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)
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT, stat=default_stat): EventEmitter.__init__(self, event_queue, watch, timeout) self._kq = select.kqueue() self._lock = threading.RLock() # A collection of KeventDescriptor. self._descriptors = KeventDescriptorSet() def custom_stat(path, self=self): stat_info = stat(path) self._register_kevent(path, S_ISDIR(stat_info.st_mode)) return stat_info self._snapshot = DirectorySnapshot(watch.path, recursive=watch.is_recursive, stat=custom_stat)
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT): EventEmitter.__init__(self, event_queue, watch, timeout) self._snapshot = DirectorySnapshot(watch.path, watch.is_recursive) self._lock = threading.Lock()
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()
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT): EventEmitter.__init__(self, event_queue, watch, timeout) self._lock = threading.Lock() self._inotify = None
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT): EventEmitter.__init__(self, event_queue, watch, timeout) self._lock = threading.Lock()
def __init__(self, event_queue, watch, timeout = DEFAULT_EMITTER_TIMEOUT): EventEmitter.__init__(self, event_queue, watch, timeout) self._lock = threading.Lock() self._directory_handle = get_directory_handle(watch.path, WATCHDOG_FILE_FLAGS) self._buffer = ctypes.create_string_buffer(BUFFER_SIZE)
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT): EventEmitter.__init__(self, event_queue, watch, timeout) self._lock = threading.Lock() self._inotify = Inotify(watch.path, watch.is_recursive)
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)
def __init__(self, event_queue, watch, timeout=DEFAULT_EMITTER_TIMEOUT): EventEmitter.__init__(self, event_queue, watch, timeout) self._lock = threading.Lock() self._handle = get_directory_handle(watch.path)
def __init__(self, event_queue, watch, timeout=1): EventEmitter.__init__(self, event_queue, watch, timeout) self._snapshot = None
def __init__(self, event_queue, watch, make_snapshot, timeout): EventEmitter.__init__(self, event_queue, watch, timeout) self._make_snapshot = make_snapshot self._snapshot = make_snapshot(self.watch.path)