MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / escapesRoot

Function escapesRoot

src/utils.ts:137–139  ·  view source on GitHub ↗
(rel: string)

Source from the content-addressed store, hash-verified

135 * `startsWith('..')` took it for a way out.
136 */
137export function escapesRoot(rel: string): boolean {
138 return rel === '..' || rel.startsWith('../') || rel.startsWith('..\\') || path.isAbsolute(rel);
139}
140
141/**
142 * Whether a filesystem error means nothing is at the path: ENOENT, or ENOTDIR,

Callers 11

matchesMethod · 0.90
walkFunction · 0.90
isIgnoredFunction · 0.90
expandWorkspaceGlobFunction · 0.90
applyAliasesFunction · 0.90
expandMembersFunction · 0.90
handleChangeMethod · 0.90
shouldIgnoreDirMethod · 0.90
outsideFunction · 0.90

Calls

no outgoing calls

Tested by 1

outsideFunction · 0.72