Creates a directory.
Directory path
Optionaloptions: { recursive?: boolean }
Set recursive to create parents
Lists directory entries.
Directory path
Entry names
Reads a file.
File path
The file contents
OptionalreadReads a file as a stream, optionally with byte range.
Optional: absent on runtimes/adapters that do not support streaming reads.
Callers MUST degrade gracefully when it is not provided (e.g. fall back to
reading the entire file via readFile).
The end offset is INCLUSIVE, matching both node:fs createReadStream and
HTTP Range semantics.
File path
Optionaloptions: { end?: number; start?: number }
Optional byte range (both start and end are inclusive)
A readable stream of bytes
OptionalrealResolves a path to its canonical absolute form, following symlinks.
Optional: absent on runtimes/adapters that cannot canonicalize paths. Callers MUST degrade gracefully when it is not provided (e.g. fall back to lexical containment) — see the static-asset handler in the React Router plugin, which uses it for symlink-safe containment when available.
File path
The canonical absolute path
Removes a file or directory.
Path to remove
Optionaloptions: { recursive?: boolean }
Set recursive to remove directories with contents
Writes a file, creating it if absent.
File path
Bytes to write
Runtime-agnostic file system operations. Absent on runtimes without file system access (edge platforms).
Since
0.1.0