MCPcopy Create free account
hub / github.com/dedsec1121fk/DedSec / append_text_sync

Function append_text_sync

Scripts/Network Tools/Store Scrapper.py:281–288  ·  view source on GitHub ↗
(path: str, text: str)

Source from the content-addressed store, hash-verified

279 pass
280
281
282def append_text_sync(path: str, text: str) -> None:
283 with open(path, "a", encoding="utf-8") as f:
284 f.write(text or "")
285 f.flush()
286 try:
287 os.fsync(f.fileno())
288 except OSError:
289 pass
290
291

Callers 1

Calls 2

writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected