vfs.vfsBase(): string
Returns:
stringThe absolute path of the reserved root directory.
Returns the directory that holds the mount points of every mounted virtual file
system, which is path.join(os.devNull, 'vfs'). Reading it lists what is
mounted; see The reserved root directory.
const vfs = require('node:vfs'); const fs = require('node:fs'); const myVfs = vfs.create(); const mountPoint = myVfs.mount(); fs.readdirSync(vfs.vfsBase()); // The name of every mount point in it mountPoint.startsWith(vfs.vfsBase()); // true