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

Function directoryOf

src/ui-server/api/entrypoints.ts:420–424  ·  view source on GitHub ↗

`src/bin/codegraph.ts` -> `src/bin`; a root file -> `.`.

(filePath: string)

Source from the content-addressed store, hash-verified

418
419/** `src/bin/codegraph.ts` -> `src/bin`; a root file -> `.`. */
420function directoryOf(filePath: string): string {
421 const normalized = filePath.replace(/\\/g, '/');
422 const cut = normalized.lastIndexOf('/');
423 return cut < 0 ? '.' : normalized.slice(0, cut);
424}

Callers 1

executableFilesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected