def read_head

near-v-framework@0.4.0.0 · domain/architecture/system/effs/io.bend:90

import near-v-framework@0.4.0.0/domain/architecture/system/effs/io.bend as Io
import Base

90# The first `max` bytes of a file ("" if unreadable): enough for what sits at its top, like imports.
91def read_head(path: String, max: U32) -> IO(String):
92  do IO<String>:
93    r : Result<&1, &1, U32 & String, File> <- File.open(path, "r")
94    read_head_opened(r, max)

Uses (9)

Used by (1)