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

Function escapesRoot

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

Source from the content-addressed store, hash-verified

134 * `startsWith('..')` took it for a way out.
135 */
136export function escapesRoot(rel: string): boolean {
137 return rel === '..' || rel.startsWith('../') || rel.startsWith('..\\') || path.isAbsolute(rel);
138}
139
140/**
141 * 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