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

Method isFreshlyRecreated

src/index.ts:354–360  ·  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

352
353 /** The database file at the path was written within the recreate grace window. */
354 private isFreshlyRecreated(): boolean {
355 try {
356 return Date.now() - fs.statSync(getDatabasePath(this.projectRoot)).mtimeMs < CodeGraph.RECREATE_GRACE_MS;
357 } catch {
358 return false;
359 }
360 }
361
362 /**
363 * 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