API reference
Capabilities
Grants a page scoped access to the filesystem.
Per-origin, per-operation filesystem capabilities for renderer code.
Every fs.* call is subject to three independent checks:
- Command: The command ACL permits the
fs.*capability surface but neither grants nor revokes filesystem access. - Operation: Each command performs one operation and requires the
corresponding
FsAccessbit in the origin’s grants. - Resource: The path must lie beneath an allow root carrying that bit and outside every deny rule held by the origin. The opened object’s real location is checked again before use.
Nothing is reachable without a grant. Links are never traversed. Denials never disclose request contents.
The public surface is Filesystem, which defines scopes and grants and
is passed to App::filesystem to install the
fs.* commands. Filesystem::authorize produces the exact authority
granted to an origin for tests and headless checks.
Modules:
policy: capability bits and thefs.*command set.fold: how each platform’s filesystems compare names and the inverse glob classes match through.path: validated names, request parsing and comparison keys.scope: allow roots and deny rules.safe: platform-specific kernel-confined opening.authorized: filesystem configuration and per-origin authority.commands: IPC handlers.audit: cross-layer invariants (tests only).
Structs
AuthorizedFsThe authority of one origin. Every operation runs the decision rules in the module documentation; nothing else reaches the filesystem for a renderer.
DirEntryOne entry of a listed directory. Links and reparse points are never listed.
FilesystemFilesystem capability configuration of named scopes and the grants that bind origins to them.
FilesystemBuilderBuilder for
Filesystem.FsAccessA set of operational filesystem capabilities.
ScopeBuilderDeclares one scope inside
FilesystemBuilder::scope.ScopeIdHandle to a scope declared on a
FilesystemBuilder. Grants name scopes by handle. A grant cannot reference a scope that was never declared.
Enums
DenialWhy an in-grant request was refused. Each variant renders one fixed, class-level message.
EntryKindThe kind of a directory entry.
FsConfigErrorA
Filesystemconfiguration that cannot be built. These are developer-facing and may name paths; they never reach a renderer.FsErrorFailure of one filesystem operation performed for an origin.