OxL Reference

data IoError

File system / OS error (std.io, std.os).

Example:

oxl✓ checked in CI
use std.io { File }

fn main() io {
  match File.readText("/definitely/not/here.txt") {
    str t => print(t)
    IoError e => print("{e.kind == IoErrorKind.NotFound}")
  }
}
Output
true
@error pub(api) data IoError

Since. 1.0.0-beta

Fields

pub(api) kind: IoErrorKind

What went wrong.

pub(api) msg: str

Detail text: path: reason.

Defined in: std/core/types.oxl:1415

See also