Write JSON to *path* and lock down permissions (unencrypted).
(path: Path, data: dict[str, Any])
| 200 | |
| 201 | |
| 202 | def _write_secure(path: Path, data: dict[str, Any]) -> None: |
| 203 | """Write JSON to *path* and lock down permissions (unencrypted).""" |
| 204 | path.write_text(json.dumps(data, indent=2), encoding="utf-8") |
| 205 | _secure_path(path) |
| 206 | |
| 207 | |
| 208 | def _read_json(path: Path) -> dict[str, Any] | None: |
no test coverage detected