Write mobile-dev-setup-tools helper scripts into ~/.mobile-dev-setup-tools. We set 'core' path inside config so the update script knows where it lives.
(core_path: Path)
| 461 | |
| 462 | |
| 463 | def load_state() -> dict: |
| 464 | if not STATE_FILE.exists(): |
| 465 | return {} |
| 466 | try: |
| 467 | data = json.loads(STATE_FILE.read_text(encoding="utf-8")) |
| 468 | return data if isinstance(data, dict) else {} |
| 469 | except (json.JSONDecodeError, OSError): |
| 470 | return {} |
| 471 | |
| 472 | |
| 473 | def save_state(state: dict) -> None: |
| 474 | ensure_dirs() |
| 475 | atomic_write_text(STATE_FILE, json.dumps(state, indent=2, sort_keys=True) + "\n") |
| 476 | |
| 477 | |
| 478 | def mark_managed_path(path: Path) -> None: |
no test coverage detected