MCPcopy Create free account
hub / github.com/emscripten-core/emscripten / recursive_mtime

Function recursive_mtime

tools/maint/heuristic_clear_cache.py:29–37  ·  view source on GitHub ↗
(path)

Source from the content-addressed store, hash-verified

27
28
29def recursive_mtime(path):
30 mtime = os.path.getmtime(path)
31 if os.path.isfile(path):
32 return mtime
33
34 with os.scandir(path) as it:
35 for entry in it:
36 mtime = max(mtime, recursive_mtime(entry.path) if entry.is_dir() else os.path.getmtime(entry.path))
37 return mtime
38
39
40def newest_mtime(paths):

Callers 1

newest_mtimeFunction · 0.85

Calls 1

maxFunction · 0.50

Tested by

no test coverage detected