MCPcopy
hub / github.com/coder/mux / rename

Method rename

src/node/services/memoryService.ts:381–385  ·  view source on GitHub ↗
(oldRelPath: string, newRelPath: string)

Source from the content-addressed store, hash-verified

379 }
380
381 async rename(oldRelPath: string, newRelPath: string): Promise<void> {
382 const newAbs = this.abs(newRelPath);
383 await fsPromises.mkdir(path.dirname(newAbs), { recursive: true });
384 await fsPromises.rename(this.abs(oldRelPath), newAbs);
385 }
386
387 async assertContained(relPath: string): Promise<void> {
388 let realRoot: string;

Callers

nothing calls this directly

Calls 2

absMethod · 0.95
renameMethod · 0.65

Tested by

no test coverage detected