def reset.published
mylsm-lsm-store@0.6.0.1 · src/ByteWalIo.bend:488
import mylsm-lsm-store@0.6.0.1/src/ByteWalIo.bend as ByteWalIo
import Base
import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs
488def reset.published(
489 +directory: String,
490 result: Result<&1, &1, U32 & String, Unit>
491) -> IO(Result<&1, &1, U32 & String, Unit>):
492 match result:
493 case Fail{failure}:
494 IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{failure})
495 case Done{Unit{}}:
496 do IO<Result<&1, &1, U32 & String, Unit>>:
497 renamed : Result<&1, &1, U32 & String, Unit> <-
498 Fs.rename(directory ++ "/WAL.tmp", directory ++ "/WAL")
499 reset.directory.synced(directory, renamed)