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

Function rmdirSync

lib/fs.js:1412–1430  ·  view source on GitHub ↗

* Synchronously removes a directory. * @param {string | Buffer | URL} path * @param {object} [options] * @returns {void}

(path, options)

Source from the content-addressed store, hash-verified

1410 * @returns {void}
1411 */
1412function 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

Callers 2

runNPMPackageTestsFunction · 0.85

Calls 2

rmdirSyncMethod · 0.45
rmdirMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…