Feb-17-2021, 09:52 AM
A Generator-Example:
import datetime from pathlib import Path def find_files_today(path): today = datetime.date.today() for file in Path().rglob("*"): try: is_file = file.is_file() # <- possible PermissionError except PermissionError: continue if not is_file: continue mdate = datetime.date.fromtimestamp(file.stat().st_mtime) if is_file and today == mdate: yield file
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
All humans together. We don't need politicians!