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

Function realpath

src/ui-server/index.ts:356–363  ·  view source on GitHub ↗

`path.resolve` + symlink resolution, falling back when the path is missing.

(dir: string)

Source from the content-addressed store, hash-verified

354
355/** `path.resolve` + symlink resolution, falling back when the path is missing. */
356function realpath(dir: string): string {
357 const resolved = path.resolve(dir);
358 try {
359 return fs.realpathSync(resolved);
360 } catch {
361 return resolved;
362 }
363}
364
365/**
366 * Bound and de-fang an attacker-supplied header before echoing it back.

Callers 1

startUiServerFunction · 0.70

Calls 1

resolveMethod · 0.65

Tested by

no test coverage detected