Home / Docs / Standard library / Prelude

Files

Release v0.4.0Edition 0.1 and later

A capability of the prelude, in scope in every module. Edition 0.1 and later.

una
pub capability Files
  op read(path: Text) -> internal Text
    fails FileError
    accepts public
  op write(path: Text, content: Text) -> Unit
    fails FileError
    accepts internal

Reads and writes files, with paths relative to the prefix the grant fixes; each operation can fail with FileError (spec/14 §3).

Specification

Generated from the standard modules of una v0.4.0 (docs/std/listing.json, which is not part of the specification). The specification governs: spec/14 §1.