def create.closed
import mylsm-lsm-store@0.6.0.1/src/ByteWalIo.bend as ByteWalIoimport Base
import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs
436# Publishes a fresh WAL header without exposing a partially truncated active file.
437def create.closed(
438 result: Result<&1, &1, U32 & String, Unit>,
439 +path: String
440) -> IO(Result<&1, &1, U32 & String, Unit>):
441 match result:
442 case Fail{failure}:
443 IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{failure})
444 case Done{Unit{}}:
445 Fs.fsync(path)