def read_dir
import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fsimport Base
466# List directory names using the bounded count-then-fetch host API.
467def read_dir(+path: String) -> IO(Result<&1, &1, U32 & String, List<String>>):
468 do IO<Result<&1, &1, U32 & String, List<String>>>:
469 n : Nat <- IO.try(Nat, read_dir_count(path))
470 names : List<String> <- read_go(Nat.add(n, 1n), path, 0n, Nil{})
471 return Done{names}