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

Function rmSync

lib/fs.js:1477–1485  ·  view source on GitHub ↗

* Synchronously removes files and * directories (modeled on the standard POSIX `rm` utility). * @param {string | Buffer | URL} path * @param {{ * force?: boolean; * maxRetries?: number; * recursive?: boolean; * retryDelay?: number; * }} [options] * @returns {void}

(path, options)

Source from the content-addressed store, hash-verified

1475 * @returns {void}
1476 */
1477function rmSync(path, options) {
1478 const h = vfsState.handlers;
1479 if (h !== null) {
1480 const result = h.rmSync(path, options);
1481 if (result !== undefined) return;
1482 }
1483 const opts = validateRmOptionsSync(path, options, false);
1484 return binding.rmSync(getValidatedPath(path), opts.maxRetries, opts.recursive, opts.retryDelay);
1485}
1486
1487/**
1488 * Forces all currently queued I/O operations associated

Callers 4

cleanupMethod · 0.50
mainFunction · 0.50
mainFunction · 0.50
clean-coverage.jsFile · 0.50

Calls 1

rmSyncMethod · 0.80

Tested by

no test coverage detected