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

Function write_text_sync

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

Source from the content-addressed store, hash-verified

269 f.write(text or "")
270
271
272def write_text_sync(path: str, text: str) -> None:
273 with open(path, "w", encoding="utf-8") as f:
274 f.write(text or "")
275 f.flush()
276 try:
277 os.fsync(f.fileno())
278 except OSError:
279 pass
280
281

Callers 2

save_productMethod · 0.70

Calls 2

writeMethod · 0.45
flushMethod · 0.45

Tested by

no test coverage detected