* Synchronously removes a directory. * @param {string | Buffer | URL} path * @param {object} [options] * @returns {void}
(path, options)
| 1410 | * @returns {void} |
| 1411 | */ |
| 1412 | function rmdirSync(path, options) { |
| 1413 | const h = vfsState.handlers; |
| 1414 | if (h !== null) { |
| 1415 | const result = h.rmdirSync(path); |
| 1416 | if (result !== undefined) return; |
| 1417 | } |
| 1418 | path = getValidatedPath(path); |
| 1419 | |
| 1420 | if (options?.recursive !== undefined) { |
| 1421 | throw new ERR_INVALID_ARG_VALUE( |
| 1422 | 'options.recursive', |
| 1423 | options.recursive, |
| 1424 | 'is no longer supported', |
| 1425 | ); |
| 1426 | } |
| 1427 | |
| 1428 | validateRmdirOptions(options); |
| 1429 | binding.rmdir(path); |
| 1430 | } |
| 1431 | |
| 1432 | /** |
| 1433 | * Asynchronously removes files and |
no test coverage detected
searching dependent graphs…