MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / _write_json

Function _write_json

src/permissions/updates.py:279–287  ·  view source on GitHub ↗
(path: str, data: dict[str, Any])

Source from the content-addressed store, hash-verified

277
278
279def _write_json(path: str, data: dict[str, Any]) -> bool:
280 try:
281 os.makedirs(os.path.dirname(path) or ".", exist_ok=True)
282 with open(path, "w") as f:
283 json.dump(data, f, indent=2)
284 return True
285 except OSError:
286 log.error("failed to persist settings to %s", path)
287 return False
288
289
290def persist_permission_update(

Callers 1

Calls 1

errorMethod · 0.80

Tested by

no test coverage detected