def write.directory.synced

mylsm-lsm-store@0.6.0.1 · src/coordinator/OwnerGenerationIo.bend:134

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

134def write.directory.synced(
135  directory: String,
136  generation: U32,
137  result: Result<&1, &1, U32 & String, Unit>
138) -> IO(Result<&1, &1, Error, U32>):
139  match result:
140    case Fail{error}:
141      IO.pure(Result<&1, &1, Error, U32>, Fail{host(error)})
142    case Done{Unit{}}:
143      do IO<Result<&1, &1, Error, U32>>:
144        synced : Result<&1, &1, U32 & String, Unit> <- Fs.fsync(directory)
145        write.completed(generation, synced)

Uses (12)

Used by (1)