def read.under

ezx@1.11.0.0 · src/ws/run.bend:270

import ezx@1.11.0.0/src/ws/run.bend as Run
import Base
import ezx@1.11.0.0/src/io/file.bend as F
import ezx@1.11.0.0/src/ws/joint.bend as J

270# every listed ez.toml under a directory, read
271def read.under(+dir: String, ps: List<&2, String>) -> IO(List<&2, J.Found>):
272  match ps:
273    case []:
274      IO.pure(List<&2, J.Found>, [])
275    case +hd <> tl:
276      do IO<List<&2, J.Found>>:
277        mm : Maybe<&2, String> <- F.read(dir ++ "/" ++ hd)
278        rest : List<&2, J.Found> <- read.under(dir, tl)
279        return J.Found{hd, F.text_of(mm)} <> rest

Uses (10)

Used by (2)