Setcmd.write_settings: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/setcmd.bend as Setcmd Lines 65-70 of cswap-bend-cli@0.1.0.0/setcmd.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&start_line=65&end_line=70 import Base import cswap-bend-cli@0.1.0.0/setload.bend as Setload import cswap-bend-cli@0.1.0.0/fs/write.bend as FWrite import cswap-bend-cli@0.1.0.0/json.bend as Json import cswap-bend-cli@0.1.0.0/act.bend as Act # Atomic 0600 write of settings.json; the backup dir is made and set 0700. def write_settings(+root: String, +j: Json.Json) -> Act.of(Unit): do ActM: FWrite.mkdir_p(root) FWrite.chmod("700", root) FWrite.write_atomic(Setload.path(root), Json.emit_pretty(j), "600") Uses (11): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Unit https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/act.bend&name=of https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs/write.bend&name=chmod https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs/write.bend&name=mkdir_p https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs/write.bend&name=write_atomic https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=Json https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/json.bend&name=emit_pretty https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&name=ActM https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setcmd.bend&name=ActM.bind https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/setload.bend&name=path