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

Function write_tools_files

Scripts/Developer Base/Mobile Developer Setup.py:463–475  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

461
462
463def 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
473def 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
478def mark_managed_path(path: Path) -> None:

Callers 1

install_setupFunction · 0.70

Calls 1

write_textFunction · 0.70

Tested by

no test coverage detected