"""Path helpers shared by config and channel integrations.""" from pathlib import Path from nanobot.config.loader import get_data_dir as _get_data_dir def get_data_dir() -> Path: """Return the global nanobot data directory (~/.nanobot).""" return _get_data_dir() def get_media_dir(channel: str | None = None) -> Path: """Return the media directory, optionally namespaced by channel.""" base = get_data_dir() / "media" if channel: base = base / str(channel) base.mkdir(parents=True, exist_ok=True) return base