MCPcopy Create free account
hub / github.com/fabioz/PyDev.Debugger / __init__

Method __init__

_pydev_bundle/fsnotify/__init__.py:80–102  ·  view source on GitHub ↗

:type root_path: str :type accept_directory: Callback[str, bool] :type accept_file: Callback[str, bool] :type max_recursion_level: int :type sleep_time: float

(self, root_path, accept_directory, accept_file, single_visit_info, max_recursion_level, sleep_time=0.0)

Source from the content-addressed store, hash-verified

78 """
79
80 def __init__(self, root_path, accept_directory, accept_file, single_visit_info, max_recursion_level, sleep_time=0.0):
81 """
82 :type root_path: str
83 :type accept_directory: Callback[str, bool]
84 :type accept_file: Callback[str, bool]
85 :type max_recursion_level: int
86 :type sleep_time: float
87 """
88 self.accept_directory = accept_directory
89 self.accept_file = accept_file
90 self._max_recursion_level = max_recursion_level
91
92 self._root_path = root_path
93
94 # Initial sleep value for throttling, it'll be auto-updated based on the
95 # Watcher.target_time_for_single_scan.
96 self.sleep_time = sleep_time
97
98 self.sleep_at_elapsed = 1.0 / 30.0
99
100 # When created, do the initial snapshot right away!
101 old_file_to_mtime = {}
102 self._check(single_visit_info, lambda _change: None, old_file_to_mtime)
103
104 def __eq__(self, o):
105 if isinstance(o, _PathWatcher):

Callers

nothing calls this directly

Calls 1

_checkMethod · 0.95

Tested by

no test coverage detected