def read.path.opened
mylsm-lsm-store@0.6.0.1 · src/ByteManifestIo.bend:76
import mylsm-lsm-store@0.6.0.1/src/ByteManifestIo.bend as ByteManifestIo
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteManifest.bend as Manifest
import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs
76def read.path.opened(
77 path: String,
78 opened: Result<&1, &1, U32 & String, File>
79) -> IO(Result<&1, &1, Error, Manifest.ManifestValue>):
80 match opened:
81 case Fail{error}:
82 read.host(error)
83 case Done{file}:
84 do IO<Result<&1, &1, Error, Manifest.ManifestValue>>:
85 size : Result<&1, &1, U32 & String, Nat> <- Fs.file_size(path)
86 read.size.result(file, size)