MCPcopy Index your code
hub / github.com/Waishnav/devspace / isInside

Function isInside

src/apply-patch.ts:183–186  ·  view source on GitHub ↗
(root: string, path: string)

Source from the content-addressed store, hash-verified

181}
182
183function isInside(root: string, path: string): boolean {
184 const rel = relative(root, path);
185 return rel === "" || (!rel.startsWith("..") && !isAbsolute(rel));
186}
187
188async function resolveConfinedPath(root: string, input: string): Promise<string> {
189 if (!input || input.includes("\0") || isAbsolute(input)) {

Callers 1

resolveConfinedPathFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected