def put

cswap-bend-cli@0.1.0.0 · fs/write.bend:28

import cswap-bend-cli@0.1.0.0/fs/write.bend as Write
import Base
import cswap-bend-cli@0.1.0.0/fs.bend as Fs

28# Truncate and write `data` (the file keeps its mode if it exists).
29def put(path: String, data: String) -> IO(Fs.Res(Unit)):
30  IO.bind(Fs.Res(File), Fs.Res(Unit), File.open(path, "w"), r => put.write(data, r))

Uses (8)

Used by (1)