MCPcopy
hub / github.com/garrytan/gstack / isPathWithin

Function isPathWithin

browse/src/platform.ts:15–17  ·  view source on GitHub ↗
(resolvedPath: string, dir: string)

Source from the content-addressed store, hash-verified

13
14/** Check if resolvedPath is within dir, using platform-aware separators. */
15export function isPathWithin(resolvedPath: string, dir: string): boolean {
16 return resolvedPath === dir || resolvedPath.startsWith(dir + path.sep);
17}

Callers 7

platform.test.tsFile · 0.90
handleWriteCommandFunction · 0.90
commitSkillFunction · 0.90
validateOutputPathFunction · 0.90
validateReadPathFunction · 0.90
validateTempPathFunction · 0.90
handleSnapshotFunction · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected