MCPcopy Create free account
hub / github.com/atomicdotdev/atomic / open

Method open

libatomic/src/daemon/journal_sink.rs:33–40  ·  view source on GitHub ↗
(root: &std::path::Path)

Source from the content-addressed store, hash-verified

31
32impl DirectJournalSink {
33 pub fn open(root: &std::path::Path) -> Result<Self, String> {
34 // Resolve (and merge, when a legacy layout is present) the merged
35 // database path — WITHOUT holding a handle.
36 let dot_dir = root.join(".atomic");
37 let path =
38 atomic_repository::ensure_database(&dot_dir).map_err(|error| error.to_string())?;
39 Ok(Self { root: path })
40 }
41
42 fn store(&self) -> Result<atomic_repository::redb_change_store::RedbChangeStore, String> {
43 atomic_repository::redb_change_store::RedbChangeStore::open_existing_wait(

Callers 6

open_sandboxMethod · 0.45
log_rpcMethod · 0.45
owner_failpointFunction · 0.45
compact_fileFunction · 0.45
runFunction · 0.45

Calls 1

ensure_databaseFunction · 0.85