(path)
| 27 | |
| 28 | |
| 29 | def 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 | |
| 40 | def newest_mtime(paths): |