MCPcopy
hub / github.com/django/django / watch_dir

Method watch_dir

django/utils/autoreload.py:301–313  ·  view source on GitHub ↗
(self, path, glob)

Source from the content-addressed store, hash-verified

299 self._stop_condition = threading.Event()
300
301 def watch_dir(self, path, glob):
302 path = Path(path)
303 try:
304 path = path.absolute()
305 except FileNotFoundError:
306 logger.debug(
307 "Unable to watch directory %s as it cannot be resolved.",
308 path,
309 exc_info=True,
310 )
311 return
312 logger.debug("Watching dir %s with glob %s.", path, glob)
313 self.directory_globs[path].add(glob)
314
315 def watched_files(self, include_globs=True):
316 """

Calls 2

debugMethod · 0.45
addMethod · 0.45