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

Function rmdir

lib/internal/fs/promises.js:1548–1571  ·  view source on GitHub ↗
(path, options)

Source from the content-addressed store, hash-verified

1546}
1547
1548async function rmdir(path, options) {
1549 const h = vfsState.handlers;
1550 if (h !== null) {
1551 const promise = h.rmdir(path);
1552 if (promise !== undefined) { await promise; return; }
1553 }
1554 path = getValidatedPath(path);
1555
1556 if (options?.recursive !== undefined) {
1557 throw new ERR_INVALID_ARG_VALUE(
1558 'options.recursive',
1559 options.recursive,
1560 'is no longer supported',
1561 );
1562 }
1563
1564 options = validateRmdirOptions(options);
1565
1566 return await PromisePrototypeThen(
1567 binding.rmdir(path, kUsePromises),
1568 undefined,
1569 handleErrorFromBinding,
1570 );
1571}
1572
1573async function fdatasync(handle) {
1574 return await PromisePrototypeThen(

Callers 2

_rmdirFunction · 0.70
_rmchildrenFunction · 0.70

Calls 1

rmdirMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…