Skip to main content
Disk mounts a host directory at a workspace path. Available in Python and Node; for browser storage, use OPFS.

Configuration

Replace root with the directory you want to access:
ls /data lists that directory. Set mode: write to allow changes to its files through Mirage. Add capacity: 1GB under config to cap the bytes the directory holds; see capacity. A second disk mount whose root resolves to a folder already mounted is refused; a folder inside one is fine.

SDK guides