MCPcopy
hub / github.com/HKUDS/ClawTeam / get_data_dir

Function get_data_dir

clawteam/team/models.py:15–23  ·  view source on GitHub ↗

Return the data directory, respecting CLAWTEAM_DATA_DIR env var and config.

()

Source from the content-addressed store, hash-verified

13
14
15def get_data_dir() -> Path:
16 """Return the data directory, respecting CLAWTEAM_DATA_DIR env var and config."""
17 custom = os.environ.get("CLAWTEAM_DATA_DIR")
18 if not custom:
19 from clawteam.config import load_config
20 custom = load_config().data_dir or None
21 p = Path(custom) if custom else Path.home() / ".clawteam"
22 p.mkdir(parents=True, exist_ok=True)
23 return p
24
25
26def _now_iso() -> str:

Callers 15

_registry_repo_rootFunction · 0.90
_workspaces_rootFunction · 0.90
_peers_dirFunction · 0.90
_teams_rootFunction · 0.90
config_healthFunction · 0.90
_costs_rootFunction · 0.90
_snapshots_rootFunction · 0.90
_team_dirMethod · 0.90
createMethod · 0.90
restoreMethod · 0.90
cleanup_teamMethod · 0.90
_tasks_rootFunction · 0.90

Calls 2

load_configFunction · 0.90
getMethod · 0.45