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

Function mounted

test/parallel/test-vfs-fs-open-callback.js:15–22  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

13const baseMountPoint = path.resolve('/tmp/vfs-open-cb-' + process.pid);
14let counter = 0;
15function mounted() {
16 const mountPoint = baseMountPoint + '-' + (counter++);
17 const myVfs = vfs.create();
18 myVfs.mkdirSync('/src', { recursive: true });
19 myVfs.writeFileSync('/src/hello.txt', 'hello world');
20 myVfs.mount(mountPoint);
21 return { myVfs, mountPoint };
22}
23
24// Open + fstat + read + close
25{

Callers 1

Calls 4

mountMethod · 0.80
createMethod · 0.45
mkdirSyncMethod · 0.45
writeFileSyncMethod · 0.45

Tested by

no test coverage detected