pub fn ensure_cache_dir(path: &Path) -> Result<()>Expand description
Creates the cache directory if it doesn’t exist and excludes it from backups.
This function:
- Creates the directory and all parent directories if they don’t exist
- Creates a
CACHEDIR.TAGfile to exclude from backup tools (borg, restic, etc.) - On macOS, marks the directory as excluded from Time Machine
This is idempotent - calling it multiple times on the same directory is safe.