Return the data directory, respecting CLAWTEAM_DATA_DIR env var and config.
()
| 13 | |
| 14 | |
| 15 | def 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 | |
| 26 | def _now_iso() -> str: |