* 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)
| 1475 | * @returns {void} |
| 1476 | */ |
| 1477 | function 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 |
no test coverage detected