def list_dir

cswap-bend-cli@0.1.0.0 · fs.bend:119

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

119# Entry names of a directory (hidden ones included, `.` and `..` not),
120# in `ls` order. A name holding a newline is not representable.
121def list_dir(path: String) -> IO(Res(List<&2, String>)):
122  IO.bind(Res(String), Res(List<&2, String>), tool("/bin/ls", ["-1A", "--", path]),
123    r => IO.pure(Res(List<&2, String>), list.of(r)))

Uses (8)

Used by (1)