def write.finish.synced

mylsm-lsm-store@0.6.0.1 · src/SstStreamIo.bend:468

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

468def write.finish.synced(
469  +path: String,
470  result: Result<&1, &1, U32 & String, Unit>
471) -> IO(Result<&1, &1, U32 & String, Unit>):
472  match result:
473    case Fail{error}:
474      IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{error})
475    case Done{Unit{}}:
476      do IO<Result<&1, &1, U32 & String, Unit>>:
477        changed : Result<&1, &1, U32 & String, Unit> <-
478          Fs.chmod(path, U32.from_nat(384n))
479        write.finish.chmod(changed)

Uses (11)

Used by (1)