def sys.write

ezsys@0.1.0.0 · src/sys.bend:130

import ezsys@0.1.0.0/src/sys.bend as Sys
import Base

130# a file's whole text replaced (created when missing)
131def sys.write(
132  path: String,
133  text: String
134) -> IO(Result<&1, &1, U32 & String, Unit>):
135  IO.bind(Result<&1, &1, U32 & String, File>,
136    Result<&1, &1, U32 & String, Unit>, File.open(path, "w"),
137    res => sys.write.opened(text, res))

Uses (10)

Used by (2)