def read_dir

mylsm-lsm-store@0.6.0.1 · src/Fs.bend:466

import mylsm-lsm-store@0.6.0.1/src/Fs.bend as Fs
import 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}

Uses (13)

Used by (1)