MCPcopy
hub / github.com/colbymchenry/codegraph / isInitialized

Function isInitialized

src/directory.ts:93–101  ·  view source on GitHub ↗
(projectRoot: string)

Source from the content-addressed store, hash-verified

91 * Requires both .codegraph/ directory AND codegraph.db to exist
92 */
93export function isInitialized(projectRoot: string): boolean {
94 const codegraphDir = getCodeGraphDir(projectRoot);
95 if (!fs.existsSync(codegraphDir) || !fs.statSync(codegraphDir).isDirectory()) {
96 return false;
97 }
98 // Must have codegraph.db, not just .codegraph folder
99 const dbPath = path.join(codegraphDir, 'codegraph.db');
100 return fs.existsSync(dbPath);
101}
102
103/**
104 * Find the nearest parent directory containing .codegraph/

Callers 11

initMethod · 0.90
initSyncMethod · 0.90
openMethod · 0.90
recreateMethod · 0.90
openSyncMethod · 0.90
isInitializedMethod · 0.90
resolveProjectPathFunction · 0.90
mainFunction · 0.90
findNearestCodeGraphRootFunction · 0.85
walkFunction · 0.85
planFrontloadFunction · 0.85

Calls 2

getCodeGraphDirFunction · 0.85
joinMethod · 0.80

Tested by

no test coverage detected