Foundry.FileSystem (foundry v0.2.0)

Copy Markdown

Validated file read boundary for all project file access in channels and controllers.

All file reads that originate from the Studio UI or copilot shell must go through this module. Direct File.read!/1 calls from channels are forbidden (enforced by Foundry.LintRules.FileWriteRule in later phases).

See ADR-020 §File system access via Foundry.FileSystem.

Summary

Types

read_error()

@type read_error() :: :outside_boundary | :not_found | File.posix()

Functions

read(project_root, relative_path)

@spec read(project_root :: String.t(), relative_path :: String.t()) ::
  {:ok, String.t()} | {:error, read_error()}