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

Function fixWinEPERM

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

Source from the content-addressed store, hash-verified

88
89
90function fixWinEPERM(path, options, originalErr, callback) {
91 chmod(path, 0o666, (err) => {
92 if (err)
93 return callback(err.code === 'ENOENT' ? null : originalErr);
94
95 stat(path, (err, stats) => {
96 if (err)
97 return callback(err.code === 'ENOENT' ? null : originalErr);
98
99 if (stats.isDirectory())
100 _rmdir(path, options, originalErr, callback);
101 else
102 unlink(path, callback);
103 });
104 });
105}
106
107
108function _rmdir(path, options, originalErr, callback) {

Callers 1

_rimrafFunction · 0.85

Calls 6

chmodFunction · 0.70
statFunction · 0.70
_rmdirFunction · 0.70
unlinkFunction · 0.70
callbackFunction · 0.50
isDirectoryMethod · 0.45

Tested by

no test coverage detected