Menu

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:

  1. Command: The command ACL permits the fs.* capability surface but neither grants nor revokes filesystem access.
  2. Operation: Each command performs one operation and requires the corresponding FsAccess bit in the origin’s grants.
  3. 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 the fs.* 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

AuthorizedFs

The authority of one origin. Every operation runs the decision rules in the module documentation; nothing else reaches the filesystem for a renderer.

DirEntry

One entry of a listed directory. Links and reparse points are never listed.

Filesystem

Filesystem capability configuration of named scopes and the grants that bind origins to them.

FsAccess

A set of operational filesystem capabilities.

ScopeBuilder

Declares one scope inside FilesystemBuilder::scope.

ScopeId

Handle to a scope declared on a FilesystemBuilder. Grants name scopes by handle. A grant cannot reference a scope that was never declared.

Enums

Denial

Why an in-grant request was refused. Each variant renders one fixed, class-level message.

EntryKind

The kind of a directory entry.

FsConfigError

A Filesystem configuration that cannot be built. These are developer-facing and may name paths; they never reach a renderer.

FsError

Failure of one filesystem operation performed for an origin.