MCPcopy Index your code
hub / github.com/VectifyAI/OpenKB / atomic_write_text

Function atomic_write_text

openkb/locks.py:227–229  ·  view source on GitHub ↗

Atomically replace *path* with text *content*.

(path: Path, content: str, *, encoding: str = "utf-8")

Source from the content-addressed store, hash-verified

225
226
227def atomic_write_text(path: Path, content: str, *, encoding: str = "utf-8") -> None:
228 """Atomically replace *path* with text *content*."""
229 atomic_write_bytes(path, content.encode(encoding))
230
231
232def atomic_write_json(

Calls 1

atomic_write_bytesFunction · 0.85