def restore_text

cswap-bend-cli@0.1.0.0 · swlive.bend:193

import cswap-bend-cli@0.1.0.0/swlive.bend as Swlive
import Base
import cswap-bend-cli@0.1.0.0/act.bend as Act
import cswap-bend-cli@0.1.0.0/fs/write.bend as FsW
import cswap-bend-cli@0.1.0.0/store/io.bend as SIo

193def restore_text(+path: String, +m: Maybe<&2, String>) -> Act.of(Unit):
194  match m:
195    case Some{t}:
196      SIo.write_secret(path, t)
197    case None{}:
198      FsW.remove(path)

Uses (6)

Used by (1)