def write.directory.synced

mylsm-lsm-store@0.6.0.1 · src/ByteSstIo.bend:230

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

230# Syncs the parent directory after SST rename publication.
231def write.directory.synced(
232  +directory: String,
233  result: Result<&1, &1, U32 & String, Unit>
234) -> IO(Result<&1, &1, U32 & String, Unit>):
235  match result:
236    case Fail{error}:
237      IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{error})
238    case Done{Unit{}}:
239      Fs.fsync(directory)

Uses (8)

Used by (1)