Expand description
Scoped filesystem module exposed to scripts as fs.
Every path passed in from JS is validated against a root directory:
- Reject absolute paths — only paths relative to the root are accepted.
- Reject any
..component in the requested path. - Canonicalise the final path and verify the result stays inside the canonicalised root (rejects symlinks that escape the root).
The canonicalisation happens at the parent directory for write operations (the target file may not exist yet) and at the target itself for reads.
Structs§
- Path
Sandbox - Enforces sandbox containment for paths used by the
fsmodule.