Expand description
Centralized path management for subcog storage locations.
This module provides a unified interface for constructing and managing paths used by subcog’s storage backends. It centralizes:
- Path constants (directory names, file names)
- Path construction methods for different storage types
- Directory creation with proper error handling
§Examples
ⓘ
use subcog::services::PathManager;
use std::path::Path;
// For project-scoped storage (user-level data dir with project facets)
let manager = PathManager::for_repo(Path::new("/path/to/repo"));
let index_path = manager.index_path();
let vector_path = manager.vector_path();
// Ensure directories exist before creating backends
manager.ensure_subcog_dir()?;Structs§
- Path
Manager - Manages storage paths for subcog backends.
Constants§
- GRAPH_
DB_ NAME - Name of the graph
SQLitedatabase file. - INDEX_
DB_ NAME - Name of the
SQLiteindex database file. - SUBCOG_
DIR_ NAME - Legacy name for the repo-local subcog directory (project storage no longer uses it).
- VECTOR_
INDEX_ NAME - Name of the vector index file.