MCPcopy Create free account
hub / github.com/concensure/Semantic / open

Method open

patch_memory/src/lib.rs:37–53  ·  view source on GitHub ↗
(repo_root: &Path)

Source from the content-addressed store, hash-verified

35
36impl PatchMemory {
37 pub fn open(repo_root: &Path) -> Result<Self> {
38 let root = repo_root.join(PATCH_DIR);
39 fs::create_dir_all(&root)?;
40 let log = root.join(PATCH_LOG_FILE);
41 let stats = root.join(PATCH_STATS_FILE);
42 let perf = root.join(MODEL_PERF_FILE);
43 if !log.exists() {
44 File::create(&log)?;
45 }
46 if !stats.exists() {
47 fs::write(&stats, "{}")?;
48 }
49 if !perf.exists() {
50 fs::write(&perf, "[]")?;
51 }
52 Ok(Self { root })
53 }
54
55 pub fn new_record_id() -> String {
56 let ts = SystemTime::now()

Callers 1

append_recordMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected