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

Function cleanup

test/parallel/test-fs-realpath.js:501–518  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

499
500 const root = `${tmpAbsDir}/node-test-realpath-abs-kids`;
501 function cleanup() {
502 ['/a/b/c/x.txt',
503 '/a/link',
504 ].forEach(function(file) {
505 try { fs.unlinkSync(root + file); } catch {
506 // Continue regardless of error.
507 }
508 });
509 ['/a/b/c',
510 '/a/b',
511 '/a',
512 '',
513 ].forEach(function(folder) {
514 try { fs.rmdirSync(root + folder); } catch {
515 // Continue regardless of error.
516 }
517 });
518 }
519
520 function setup() {
521 cleanup();

Callers 2

setupFunction · 0.70
test_abs_with_kidsFunction · 0.70

Calls 3

forEachMethod · 0.65
unlinkSyncMethod · 0.45
rmdirSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…