MCPcopy
hub / github.com/django/django / snapshot_files

Method snapshot_files

django/utils/autoreload.py:425–437  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

423 yield
424
425 def snapshot_files(self):
426 # watched_files may produce duplicate paths if globs overlap.
427 seen_files = set()
428 for file in self.watched_files():
429 if file in seen_files:
430 continue
431 try:
432 mtime = file.stat().st_mtime
433 except OSError:
434 # This is thrown when the file does not exist.
435 continue
436 seen_files.add(file)
437 yield file, mtime
438
439 @classmethod
440 def check_availability(cls):

Calls 2

watched_filesMethod · 0.80
addMethod · 0.45