MCPcopy Index your code
hub / github.com/nodejs/node / renameSync

Method renameSync

lib/internal/vfs/file_system.js:356–360  ·  view source on GitHub ↗

* Renames a file or directory synchronously. * @param {string} oldPath The old path * @param {string} newPath The new path

(oldPath, newPath)

Source from the content-addressed store, hash-verified

354 * @param {string} newPath The new path
355 */
356 renameSync(oldPath, newPath) {
357 const oldProviderPath = this.#toProviderPath(oldPath);
358 const newProviderPath = this.#toProviderPath(newPath);
359 this[kProvider].renameSync(oldProviderPath, newProviderPath);
360 }
361
362 /**
363 * Copies a file synchronously.

Callers

nothing calls this directly

Calls 1

#toProviderPathMethod · 0.95

Tested by

no test coverage detected