vfs.create(provider?, options?): VirtualFileSystem
Attributes
provider?:
VirtualProviderThe provider to use. Default:
new MemoryProvider().options:
ObjectemitExperimentalWarning?:
booleanWhether to emit the experimental
warning when the instance is created. Default:
true.Returns:
VirtualFileSystemConvenience factory equivalent to new VirtualFileSystem(provider, options).
const vfs = require('node:vfs'); // Default in-memory provider const memoryVfs = vfs.create(); // Explicit provider const realVfs = vfs.create(new vfs.RealFSProvider('/tmp/vfs-root'));