| # 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) | |
| # 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) | |