MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / toPosixRelative

Function toPosixRelative

packages/agent-core/src/services/fs/fsPathSafety.ts:112–118  ·  view source on GitHub ↗
(cwd: string, absolute: string)

Source from the content-addressed store, hash-verified

110}
111
112function toPosixRelative(cwd: string, absolute: string): string {
113 if (absolute === cwd) return '.';
114 const rel = path.relative(cwd, absolute);
115 if (rel === '') return '.';
116
117 return rel.split(path.sep).join('/');
118}

Callers 1

resolveSafePathFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected