def write_tail.fsync

mylsm-lsm-store@0.6.0.1 · src/legacy/ManifestIo.bend:23

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

23def write_tail.fsync(
24  result: Result<&1, &1, U32 & String, Unit>,
25  +path: String
26) -> IO(Result<&1, &1, U32 & String, Unit>):
27  match result:
28    case Fail{error}:
29      IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{error})
30    case Done{Unit{}}:
31      do IO<Result<&1, &1, U32 & String, Unit>>:
32        synced : Result<&1, &1, U32 & String, Unit> <- Fs.fsync(path)
33        write_tail.chmod(synced, path)

Uses (10)

Used by (1)