MCPcopy Create free account
hub / github.com/QodeXcli/QodeX / normalizeRel

Function normalizeRel

src/orchestration/engine.ts:309–313  ·  view source on GitHub ↗
(p: string, cwd: string)

Source from the content-addressed store, hash-verified

307}
308
309function normalizeRel(p: string, cwd: string): string {
310 let rel = p.trim().replace(/^['"]|['"]$/g, '');
311 if (path.isAbsolute(rel)) rel = path.relative(cwd, rel);
312 return rel.replace(/^\.\//, '');
313}
314
315async function isNewFile(cwd: string, rel: string): Promise<boolean> {
316 try { await fs.stat(path.join(cwd, rel)); return false; } catch { return true; }

Callers 1

extractFileEditsFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected