Initialize a new repository at the given path. This creates the `.atomic` directory structure and initializes the database with an empty graph. # Arguments `path` - The directory to initialize as a repository # Errors Returns an error if: - A repository already exists at the path - The directory cannot be created - The database cannot be initialized
(path: P)
| 240 | /// - The directory cannot be created |
| 241 | /// - The database cannot be initialized |
| 242 | pub fn init<P: AsRef<Path>>(path: P) -> Result<Self, RepositoryError> { |
| 243 | Self::init_with_view(path, DEFAULT_VIEW) |
| 244 | } |
| 245 | |
| 246 | /// Initialize a new repository whose default view has the given name. |
| 247 | /// |