def header

bendtorch-load@1.3.0.0 · main.bend:567

import bendtorch-load@1.3.0.0/main.bend as BendtorchLoad
import Base

567# A safetensors file's header, parsed; the file is closed after it
568def header(+path: String) -> IO(Header):
569  do IO<Header>:
570    f : File <- IO.try(File, File.open(path, "r"))
571    r : File & Result<&1, &1, U32 & String, List<&2, U32>> <- File.read_at(f, 0, 8)
572    St.first8(path, r)

Uses (13)

Used by (2)