def open.file

mylsm-lsm-store@0.6.0.1 · src/scan/ByteBlockReader.bend:433

import mylsm-lsm-store@0.6.0.1/src/scan/ByteBlockReader.bend as ByteBlockReader
import Base
import mylsm-lsm-store@0.6.0.1/src/SstStreamIo.bend as SstStreamIo

433def open.file(
434  +size: Nat,
435  opened: Result<&1, &1, U32 & String, File>
436) -> IO(Result<&1, &1, U32 & String, Reader>):
437  match opened:
438    case Fail{error}:
439      IO.pure(Result<&1, &1, U32 & String, Reader>, Fail{error})
440    case Done{file}:
441      do IO<Result<&1, &1, U32 & String, Reader>>:
442        pair : File & Result<&1, &1, U32 & String, SstStreamIo.ExactResult> <-
443          SstStreamIo.exact.start(file, 20n)
444        open.header.pair(size, pair)

Uses (13)

Used by (1)