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

Function topLevelFolder

src/mcp/tools.ts:1954–1957  ·  view source on GitHub ↗

A path's first folder, or '' for a file at the project root.

(filePath: string)

Source from the content-addressed store, hash-verified

1952 */
1953/** A path's first folder, or '' for a file at the project root. */
1954function topLevelFolder(filePath: string): string {
1955 const slash = filePath.indexOf('/');
1956 return slash > 0 ? filePath.slice(0, slash) : '';
1957}
1958
1959/**
1960 * The order in which codegraph_node's multi-definition answer fills its

Callers 2

definitionCapOrderFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected