package yocaml
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=89a74bd5cb37e580e45e4ed3d43b07b2cca5af9ab7f98966c48fe9730dc4af2e
sha512=ae77555570320c28c47d748e75056ccc44bb43cddf6fef70e8b556254fd809d67b915b313bd1833c28581db1fdeefbe34e81d5548744d6ecabe466ee1ef6284c
doc/yocaml/Yocaml/Batch/index.html
Module Yocaml.BatchSource
Allows you to run batches of actions (on lists, directories, etc.)
iter list action cache Executes the given action on all element of the given list. The cache is passed from call to call. see: Action.batch_list
val fold :
state:'a ->
'b list ->
('b -> 'a -> Cache.t -> (Cache.t * 'a) Eff.t) ->
Cache.t ->
(Cache.t * 'a) Eff.tfold ~state list action cache Executes the given action on all element of the given list. The cache is passed from call to call and instead of iter, you can maintain your own additional state. see: Action.fold_list
val iter_children :
?only:[ `Both | `Directories | `Files ] ->
?where:(Path.t -> bool) ->
Path.t ->
(Path.t -> Action.t) ->
Action.titer_children ?only ?where path action cache Executes the given action on all child files of the given path. The cache is passed from call to call. see: Action.batch
val fold_children :
?only:[ `Both | `Directories | `Files ] ->
?where:(Path.t -> bool) ->
state:'a ->
Path.t ->
(Path.t -> 'a -> Cache.t -> (Cache.t * 'a) Eff.t) ->
Cache.t ->
(Cache.t * 'a) Eff.tfold_children ?only ?where ~state path action cache Executes the given action on all child files of the given path. The cache is passed from call to call and instead of iter_children, you can maintain your own additional state. see: Action.fold
iter_files is iter_children ~only:`Files.
val fold_files :
?where:(Path.t -> bool) ->
state:'a ->
Path.t ->
(Path.t -> 'a -> Cache.t -> (Cache.t * 'a) Eff.t) ->
Cache.t ->
(Cache.t * 'a) Eff.tfold_files is fold_children ~only:`Files.
iter_directories is iter_children ~only:`Directories.