Runtime boundary
veryfront/fs uses the native process filesystem selected for Deno, Node, or Bun.
It does not delegate to the runtime.get().fs adapter. Custom adapters
configured with runtime.set() affect adapter-consuming APIs, not these
compatibility functions.
veryfront/fs does not add a project-root sandbox, block .env or other
secret-file names, or validate paths from untrusted input. Relative paths
resolve from cwd(). Absolute paths and .. segments can reach any location
that the runtime permits.
Runtime permissions remain the outer boundary. Hosted project secrets are
supplied through request-owned environment data rather than .env files.
Isolated Pages route ctx.fs is a separate, read-only, project-confined
capability. Those protections do not change the contract of veryfront/fs.
Canonicalize a trusted root and candidate with realPath, then use
validateLexicalPath from veryfront/security before reading a
user-influenced path. Canonicalization follows existing symlinks before the
containment check.
Path admission is not an operating-system sandbox.
The trusted root must not be writable by untrusted or project code while a
validated path is in use. Otherwise, concurrent filesystem changes can
create a time-of-check/time-of-use race between validation and reading.