def write.closed

mylsm-lsm-store@0.6.0.1 · src/ByteManifestIo.bend:115

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

115def write.closed(
116  +directory: String,
117  result: Result<&1, &1, U32 & String, Unit>
118) -> IO(Result<&1, &1, U32 & String, Unit>):
119  match result:
120    case Fail{error}: IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{error})
121    case Done{Unit{}}:
122      do IO<Result<&1, &1, U32 & String, Unit>>:
123        synced : Result<&1, &1, U32 & String, Unit> <- Fs.fsync(directory ++ "/MANIFEST.tmp")
124        write.renamed(directory, synced)

Uses (11)

Used by (1)