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

Function mounted

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

Source from the content-addressed store, hash-verified

13const baseMountPoint = path.resolve('/tmp/vfs-readFile-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// readFile (cb)
25{

Calls 4

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

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…