def open.existing.present

mylsm-lsm-store@0.6.0.1 · src/ByteDurableDb.bend:415

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

415# Validates the WAL path before acquiring ownership.
416def open.existing.present(
417  +path: String,
418  result: Result<&1, &1, U32 & String, Bool>
419) -> IO(Result<&1, &1, Error, Handle>):
420  match result:
421    case Fail{error}:
422      IO.pure(Result<&1, &1, Error, Handle>, Fail{io.error(error)})
423    case Done{False{}}:
424      IO.pure(Result<&1, &1, Error, Handle>, Fail{NotFound{}})
425    case Done{True{}}:
426      open.existing(path)

Uses (11)

Used by (1)