In-memory
Fully in-memory filesystem backed by Maps. Works in both Node and browser.OPFS (browser)
Persistent filesystem using the Origin Private File System API. This is the default forcreateBrowserDriver().
OPFS does not support atomic rename operations.
Node filesystem
Thin wrapper around Node.jsfs/promises. Provides real host filesystem access (gated by permissions).
VirtualFileSystem interface
All backends implement this interface:| Method | Returns | Description |
|---|---|---|
readFile(path) | Promise<Uint8Array> | Read file as bytes |
readTextFile(path) | Promise<string> | Read file as text |
readDir(path) | Promise<string[]> | List directory entries |
readDirWithTypes(path) | Promise<DirEntry[]> | List entries with type info |
writeFile(path, content) | Promise<void> | Write file |
createDir(path) | Promise<void> | Create directory |
mkdir(path) | Promise<void> | Create directory (alias) |
exists(path) | Promise<boolean> | Check if path exists |
stat(path) | Promise<StatInfo> | Get file metadata |
removeFile(path) | Promise<void> | Delete a file |
removeDir(path) | Promise<void> | Delete a directory |
rename(old, new) | Promise<void> | Rename a file or directory |