def write_file.opened
mylsm-lsm-store@0.6.0.1 · src/legacy/ManifestIo.bend:46
import mylsm-lsm-store@0.6.0.1/src/legacy/ManifestIo.bend as ManifestIo
import Base
46def write_file.opened(
47 opened: Result<&1, &1, U32 & String, File>,
48 +path: String,
49 +data: String
50) -> IO(Result<&1, &1, U32 & String, Unit>):
51 match opened:
52 case Fail{error}:
53 IO.pure(Result<&1, &1, U32 & String, Unit>, Fail{error})
54 case Done{file}:
55 do IO<Result<&1, &1, U32 & String, Unit>>:
56 written : File & Result<&1, &1, U32 & String, Unit> <- File.write(file, data)
57 write_tail(written, path)