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

Method isFreshlyRecreated

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

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