Dirlock.take_once: def of cswap-bend-cli@0.1.0.0 Import: import cswap-bend-cli@0.1.0.0/dirlock.bend as Dirlock Lines 38-40 of cswap-bend-cli@0.1.0.0/dirlock.bend: https://jend.leeeet.dev/read.txt?path=cswap-bend-cli@0.1.0.0/dirlock.bend&start_line=38&end_line=40 import Base import cswap-bend-cli@0.1.0.0/fs.bend as Fs import cswap-bend-cli@0.1.0.0/act.bend as Act # One attempt: mkdir without -p, so it fails while the lock is held. def take_once(+dir: String) -> Act.of(Bool): IO.bind(Fs.Res(String), Fs.Res(Bool), Fs.tool("/bin/mkdir", [dir]), r => IO.pure(Fs.Res(Bool), mkdir_ok(r))) Uses (9): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.bind https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=IO.pure https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String 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/dirlock.bend&name=mkdir_ok https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs.bend&name=Res https://jend.leeeet.dev/definition.txt?path=cswap-bend-cli@0.1.0.0/fs.bend&name=tool