def source.sized.checked
mylsm-lsm-store@0.6.0.1 · src/transfer/RestoreIo.bend:489
import mylsm-lsm-store@0.6.0.1/src/transfer/RestoreIo.bend as RestoreIo
import Base
489def source.sized.checked(
490 +destination: String,
491 +source: String,
492 size: Nat,
493 valid: Bool
494) -> IO(Result<&1, &1, Error, Unit>):
495 match valid:
496 case False{}:
497 IO.pure(Result<&1, &1, Error, Unit>, Fail{ResourceLimit{}})
498 case True{}:
499 do IO<Result<&1, &1, Error, Unit>>:
500 opened : Result<&1, &1, U32 & String, File> <- File.open(source, "r")
501 source.opened(destination, size, opened)