Module Core_extended.Find

Unix like find.

type t
type file_info = string * Core.Unix.stats
module Options : sig ... end
val create : ?⁠options:Options.t ‑> string ‑> t

create ?options dir create a Find.t based in dir

val next : t ‑> file_info option

next t return the next file from the collection of valid files in t or None if no more files remain

val close : t ‑> unit

close t drops all the resources associated with t. It is a mistake to attempt to use t again. Any Find.t will be automatically closed after the last file is read by any means.

val iter : t ‑> f:(file_info ‑> unit) ‑> unit

iter t ~f calls f on every file in t

val fold : t ‑> init:'a ‑> f:('a ‑> file_info ‑> 'a) ‑> 'a

fold t ~init ~f folds f over the files in t

val to_list : t ‑> file_info list

to_list t returns all of the remaining files in t as a list in the order they would have been returned by subsequent calls to next

val find_all : ?⁠options:Options.t ‑> string ‑> file_info list

find_all ?options dir short for to_list (create ?options dir)