touch_grass/file_system/read_file

Read the contents of a file

Accepts a limit by default, this should be large. The effect doesn’t assume a file is kept open and so streaming very large files should be handled as a different effect.

Types

pub type Input {
  Input(path: String, offset: Int, limit: Int)
}

Constructors

  • Input(path: String, offset: Int, limit: Int)

Values

pub fn decode(
  input: value.Value(a, b),
) -> Result(Input, break.Reason(a, b))
pub fn encode(
  result: Result(BitArray, String),
) -> value.Value(a, b)
Search Document