def write_tail
import mylsm-lsm-store@0.6.0.1/src/legacy/ManifestIo.bend as ManifestIoimport Base
35# Writes the remaining bytes of a file buffer.
36def write_tail(
37 fr: File & Result<&1, &1, U32 & String, Unit>,
38 +path: String
39) -> IO(Result<&1, &1, U32 & String, Unit>):
40 match fr:
41 case (file, result):
42 do IO<Result<&1, &1, U32 & String, Unit>>:
43 _closed : Unit <- File.close(file)
44 write_tail.fsync(result, path)