pls-rag / modules /utils.py
m97j's picture
Initial codes commit
4fdc679
raw
history blame
247 Bytes
# rag/modules/utils.py
import os
def ensure_dir(path: str):
os.makedirs(path, exist_ok=True)
def touch(path: str):
with open(path, "a", encoding="utf-8") as f:
pass
def exists(path: str) -> bool:
return os.path.exists(path)