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

Function underWebRoot

src/resolution/php-web-root.ts:56–59  ·  view source on GitHub ↗
(root: string, written: string)

Source from the content-addressed store, hash-verified

54 * written; null when it leaves the project.
55 */
56export function underWebRoot(root: string, written: string): string | null {
57 const target = path.posix.normalize(path.posix.join(root || '.', written));
58 return target === '..' || target.startsWith('../') ? null : target;
59}
60
61/**
62 * Each folder holding a file with a `$_SERVER['DOCUMENT_ROOT']` include → the

Callers 2

resolvePhpIncludePathFunction · 0.90
inferPhpWebRootsFunction · 0.85

Calls 2

normalizeMethod · 0.80
joinMethod · 0.45

Tested by

no test coverage detected