MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isFreshlyRecreated

Method isFreshlyRecreated

src/index.ts:350–356  ·  view source on GitHub ↗

The database file at the path was written within the recreate grace window.

()

Source from the content-addressed store, hash-verified

348
349 /** The database file at the path was written within the recreate grace window. */
350 private isFreshlyRecreated(): boolean {
351 try {
352 return Date.now() - fs.statSync(getDatabasePath(this.projectRoot)).mtimeMs < CodeGraph.RECREATE_GRACE_MS;
353 } catch {
354 return false;
355 }
356 }
357
358 /**
359 * Heal a stale database handle in place. If `.codegraph/` was removed and

Callers 1

syncMethod · 0.95

Calls 1

getDatabasePathFunction · 0.90

Tested by

no test coverage detected