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

Function json_dump_sync

Scripts/Network Tools/Store Scrapper.py:256–263  ·  view source on GitHub ↗
(obj: Any, path: str)

Source from the content-addressed store, hash-verified

254
255
256def json_dump_sync(obj: Any, path: str) -> None:
257 with open(path, "w", encoding="utf-8") as f:
258 json.dump(obj, f, indent=2, ensure_ascii=False)
259 f.flush()
260 try:
261 os.fsync(f.fileno())
262 except OSError:
263 pass
264
265
266def write_text(path: str, text: str) -> None:

Callers 3

save_productMethod · 0.70
save_global_stateMethod · 0.70

Calls 1

flushMethod · 0.45

Tested by

no test coverage detected