Virtual File System implementation.
Provides an in-memory file system that can be mounted to intercept Node.js fs operations.
class VirtualFileSystemWhether the VFS is mounted
The mount point path, or null if not mounted
Whether overlay mode is enabled
Promise-based file operations
The underlying provider
Whether this provider is read-only
Whether virtual working directory is enabled
Check file access
Append to a file
Set the virtual current working directory.
Change file mode.
Close an open file descriptor.
Copy a file
Create a readable stream
Create a writable stream
Get the virtual current working directory.
Check if a path exists.
Sync data to disk (data only)
Get file stats for an open file descriptor.
Sync data to disk
Truncate an open file
Find files matching a pattern (async)
Find files matching a pattern
Get file stats without following symlinks.
Create a directory synchronously.
Mount the VFS at the specified path. After mounting, fs operations to paths under the mount point will be handled by this VFS.
Open a file synchronously.
Read a directory synchronously.
Read a file
Read a symbolic link.
Read from an open file synchronously.
Get the real path (resolve symlinks).
Rename a file or directory.
Remove a directory synchronously.
Remove a file or directory
Get file stats synchronously.
Create a symbolic link.
Truncate a file.
Remove a file synchronously.
Unmount the VFS.
Stop watching a file
Change file access and modification times.
Watch for file changes
Watch a file for changes
Write a file
Write to an open file synchronously.