MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / joinPath

Function joinPath

graph-ui/src/provider/cbm-rpc-provider.ts:2025–2027  ·  view source on GitHub ↗

* Workspace root and a workspace-relative path, joined. * * `node:path` would be one import away and is the one import this file may not * have: everything here runs in a browser. The join is the whole of what was * used, and a POSIX-shaped one is correct for what it joins, since the paths * co

(root: string, relativePath: string)

Source from the content-addressed store, hash-verified

2023 * come from the index and the index writes them with forward slashes.
2024 */
2025function joinPath(root: string, relativePath: string): string {
2026 return `${normalizeRoot(root)}/${relativePath.replace(/^\/+/, '')}`;
2027}
2028
2029function fileFromUri(uri: string): string | undefined {
2030 return uri.length > 0 ? uri : undefined;

Callers 1

scanRoutesMethod · 0.85

Calls 1

normalizeRootFunction · 0.85

Tested by

no test coverage detected