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

Function cleanup

test/parallel/test-fs-rm.js:588–612  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

586 execSync(`icacls "${child}" /deny "everyone:(DE)"`);
587
588 const cleanup = () => {
589 try {
590 execSync(`icacls "${child}" /remove:d "everyone"`);
591 } catch {
592 // Best-effort cleanup; ignore failures (e.g. already cleared).
593 }
594 try {
595 execSync(`icacls "${parent}" /remove:d "everyone"`);
596 } catch {
597 // Best-effort cleanup; ignore failures.
598 }
599 try {
600 execSync(`icacls "${dirname}" /remove:d "everyone"`);
601 } catch {
602 // Best-effort cleanup; ignore failures.
603 }
604 try {
605 fs.rmSync(dirname, common.mustNotMutateObjectDeep({
606 recursive: true,
607 force: true,
608 }));
609 } catch {
610 // Best-effort cleanup; ignore failures.
611 }
612 };
613 process.on('exit', cleanup);
614
615 fs.rm(dirname, common.mustNotMutateObjectDeep({ recursive: true }),

Callers 15

testFunction · 0.70
test-tls-addca.jsFile · 0.70
testWrongALPNFunction · 0.70
testNoALPNFunction · 0.70
testFunction · 0.70

Calls 2

execSyncFunction · 0.85
rmSyncMethod · 0.80

Tested by 7

testFunction · 0.56
testFunction · 0.56
testFunction · 0.56
testFunction · 0.56
testFunction · 0.56
testFunction · 0.56
testFunction · 0.56

Used in the wild real call sites across dependent graphs

searching dependent graphs…