t1eautomat's picture
upload to huggingface (exclude binary indexes)
15c3265
raw
history blame contribute delete
285 Bytes
"""I/O helpers."""
from pathlib import Path
def read_text(path: str) -> str:
return Path(path).read_text(encoding="utf-8")
def write_text(path: str, text: str) -> None:
Path(path).parent.mkdir(parents=True, exist_ok=True)
Path(path).write_text(text, encoding="utf-8")