Create a change store from a repository root directory. This is a convenience method that constructs the changes directory path from the repository root (containing `.atomic/`). # Arguments `root` - Path to the repository root `cache_capacity` - Maximum number of changes to keep in memory # Example ```rust,ignore let store = ChangeStore::from_root("/path/to/repo", 100)?; // Equivalent to: Cha
(root: P, cache_capacity: usize)
| 259 | /// // Equivalent to: ChangeStore::new("/path/to/repo/.atomic/changes", 100) |
| 260 | /// ``` |
| 261 | pub fn from_root<P: AsRef<Path>>(root: P, cache_capacity: usize) -> ChangeStoreResult<Self> { |
| 262 | let changes_dir = root.as_ref().join(atomic_core::DOT_DIR).join("changes"); |
| 263 | Self::new(changes_dir, cache_capacity) |
| 264 | } |
| 265 | |
| 266 | /// Get the path to the changes directory. |
| 267 | pub fn changes_dir(&self) -> &Path { |