Atomically write ``text`` (UTF-8) to ``path``. See :func:`_atomic_replace`.
(path: "str | Path", text: str)
| 253 | |
| 254 | |
| 255 | def write_text_atomic(path: "str | Path", text: str) -> None: |
| 256 | """Atomically write ``text`` (UTF-8) to ``path``. See :func:`_atomic_replace`.""" |
| 257 | _atomic_replace(path, lambda f: f.write(text)) |
| 258 | |
| 259 | |
| 260 | def write_text_atomic_if_changed(path: "str | Path", text: str) -> bool: |