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

Function prepareTestDirectory

benchmark/fs/bench-cpSync.js:14–26  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

12});
13
14function prepareTestDirectory() {
15 const testDir = tmpdir.resolve(`test-cp-${process.pid}`);
16 fs.mkdirSync(testDir, { recursive: true });
17
18 fs.writeFileSync(path.join(testDir, 'source.txt'), 'test content');
19
20 fs.symlinkSync(
21 path.join(testDir, 'source.txt'),
22 path.join(testDir, 'link.txt'),
23 );
24
25 return testDir;
26}
27
28function main({ n, dereference, force }) {
29 tmpdir.refresh();

Callers 1

mainFunction · 0.85

Calls 5

resolveMethod · 0.45
mkdirSyncMethod · 0.45
writeFileSyncMethod · 0.45
joinMethod · 0.45
symlinkSyncMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…