This commit is contained in:
2026-01-05 14:47:49 -01:00
5 changed files with 53 additions and 18 deletions

View File

@@ -1,3 +1,4 @@
import os
from datetime import datetime
@@ -34,3 +35,14 @@ def toInt(v: str) -> int | None:
def print_ym(dt: datetime) -> str:
return dt.strftime("%Y-%m")
def fileExists(fname: str) -> bool:
files = set(os.listdir())
if fname not in files:
return False
if not os.path.isfile(fname):
return False
return True