MCPcopy Create free account
hub / github.com/nodejs/node / _rmdir

Function _rmdir

lib/internal/fs/rimraf.js:108–119  ·  view source on GitHub ↗
(path, options, originalErr, callback)

Source from the content-addressed store, hash-verified

106
107
108function _rmdir(path, options, originalErr, callback) {
109 rmdir(path, (err) => {
110 if (err) {
111 if (notEmptyErrorCodes.has(err.code))
112 return _rmchildren(path, options, callback);
113 if (err.code === 'ENOTDIR')
114 return callback(originalErr);
115 }
116
117 callback(err);
118 });
119}
120
121
122function _rmchildren(path, options, callback) {

Callers 2

_rimrafFunction · 0.70
fixWinEPERMFunction · 0.70

Calls 4

_rmchildrenFunction · 0.85
rmdirFunction · 0.70
hasMethod · 0.65
callbackFunction · 0.50

Tested by

no test coverage detected