MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / addPath

Function addPath

src/utils/renderers/path-tree.ts:58–71  ·  view source on GitHub ↗
(root: PathTreeNode, parsedPath: ParsedPath)

Source from the content-addressed store, hash-verified

56}
57
58function addPath(root: PathTreeNode, parsedPath: ParsedPath): void {
59 let node = root;
60 for (const component of parsedPath.components) {
61 const existing = node.children.get(component);
62 if (existing) {
63 node = existing;
64 } else {
65 const child = createNode(component, childRawPath(node.rawPath, component));
66 node.children.set(component, child);
67 node = child;
68 }
69 }
70 node.label = parsedPath.label;
71}
72
73function relativeRawPath(fromPath: string, toPath: string): string {
74 if (fromPath === '/') {

Callers 1

formatPathTreeFunction · 0.85

Calls 3

childRawPathFunction · 0.85
getMethod · 0.80
createNodeFunction · 0.70

Tested by

no test coverage detected