Skip to main content

Module path_manager

Module path_manager 

Source
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§

PathManager
Manages storage paths for subcog backends.

Constants§

GRAPH_DB_NAME
Name of the graph SQLite database file.
INDEX_DB_NAME
Name of the SQLite index 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.