def sys.write
import ezsys@0.1.0.0/src/sys.bend as Sysimport 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))