def disk.all
ezx@1.11.0.0 · src/lock/run.bend:144
import ezx@1.11.0.0/src/lock/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/pkg/pkg.bend as K
import ezx@1.11.0.0/src/pkg/path.bend as P
144
145
146def disk.all(+dir: String, fs: List<&2, K.Item>) -> IO(List<&2, String>):
147 match fs:
148 case []:
149 IO.pure(List<&2, String>, [])
150 case +h <> t:
151 do IO<List<&2, String>>:
152 m : Maybe<&2, String> <- F.read(P.join(dir, K.file.at(h)))
153 rest : List<&2, String> <- disk.all(dir, t)
154 return F.text_of(m) <> rest