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

Function relativeRawPath

src/utils/renderers/path-tree.ts:73–84  ·  view source on GitHub ↗
(fromPath: string, toPath: string)

Source from the content-addressed store, hash-verified

71}
72
73function relativeRawPath(fromPath: string, toPath: string): string {
74 if (fromPath === '/') {
75 return toPath.startsWith('/') ? toPath.slice(1) : toPath;
76 }
77 if (toPath === fromPath) {
78 return '';
79 }
80 if (toPath.startsWith(`${fromPath}/`)) {
81 return toPath.slice(fromPath.length + 1);
82 }
83 return toPath;
84}
85
86function appendDirectorySlash(name: string, hasChildren: boolean): string {
87 return hasChildren && !name.endsWith('/') ? `${name}/` : name;

Callers 1

renderNodeFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected