def verified.closed

mylsm-lsm-store@0.6.0.1 · src/transfer/RestoreIo.bend:196

import mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend as RestoreIo
import Base
import mylsm-lsm-store@0.6.0.1/src/ByteDurableDb.bend as Db

196def verified.closed(
197  path: String,
198  expected: Nat,
199  count: Nat,
200  closed: Result<&1, &1, Db.Error, Unit>
201) -> IO(Result<&1, &1, Error, Unit>):
202  match closed:
203    case Fail{error}:
204      do IO<Result<&1, &1, Error, Unit>>:
205        cleanup.directory(path)
206        return Fail{Storage{error}}
207    case Done{Unit{}}:
208      verify_count(path, Nat.is_eq(count, expected))

Uses (12)

Used by (1)