DiskResource mounts a directory on the host filesystem. Reads and writes go through node:fs against the configured root.
Node only. The browser SDK has no kernel filesystem; use OPFS instead.
Install
Config
Mount mode
read, write, exec. Use MountMode.EXEC if you need commands to run binaries from the mount.
Snapshot behavior
DiskResource.toState() captures the file tree as bytes. Loading a snapshot back doesn’t re-create the directory; pass a config file with a fresh root if the original location changed.
For behavior shared with Python (filesystem layout, supported shell commands), see the Python Disk docs.