Yocaml.PipelineSourceA pipeline is a succession of Task that enable concrete elements to be built. Building a construction system generally consists of composing pipelines together.
track_file filepath is a dummy task that just add a file to a dependcies set and do nothing.
It useful to watch file modification, like binaries just, for example, to replay a task if the binary was recompiled.
track_files list_of_filepath is like track_file but for multiple files.
read_file path is a task that read the content of a file.
directory_exists path is a task that ensure that path exists as a directory. (Fit well with Yocaml.Task.when_). path is not added to the dependency set.
file_exists path is a task that ensure that path exists as a file. (Fit well with Yocaml.Task.when_). path is not added to the dependency set.
pipe f arr will pipe an arrow applying f previous_result result_of arr. For example, it can be used for piping files content : pipe (fun x y -> x ^ "\n" ^ y) (read_file path).
val read_file_as_metadata :
(module Required.DATA_PROVIDER) ->
(module Required.DATA_READABLE with type t = 'a) ->
?snapshot:bool ->
Path.t ->
(unit, 'a) Task.tread_file_as_metadata (module P) (module R) ?extraction_strategy path is a task that read a file located by a path and validates the content as metadata according to a Yocaml.Required.DATA_PROVIDER, P, using the description provided by R of type Yocaml.Required.DATA_READABLE.
val read_file_with_metadata :
(module Required.DATA_PROVIDER) ->
(module Required.DATA_READABLE with type t = 'a) ->
?extraction_strategy:Metadata.extraction_strategy ->
?snapshot:bool ->
Path.t ->
(unit, 'a * string) Task.tread_file_with_metadata (module P) (module R) ?extraction_strategy path is a task that read a file located by a path and uses an extraction_strategy to separate the metadata from the content and validates the metadata according to a Yocaml.Required.DATA_PROVIDER, P, using the description provided by R of type Yocaml.Required.DATA_READABLE.
pipe_files ?separator list_of_path build a task that pipe file toegether using separator as a separator.
exec_cmd ?is_success cmd is a task that performs a shell command (Yocaml.Cmd). watched arguments are used to define the dependencies set. When is_success is provided, it is called with the exit code to determine whether it indicates success or failure. Without is_success, success requires the process to return an exit code of 0.
exec_cmd_with_result ?is_success cmd is like exec_cmd but the output of the shell command is returned.
val as_template :
(module Required.DATA_TEMPLATE) ->
(module Required.DATA_INJECTABLE with type t = 'a) ->
?snapshot:bool ->
?strict:bool ->
Path.t ->
('a * string, 'a * string) Task.tas_template (module T) (module M) ?strict path is an arrow that apply a path as a template.
val chain_templates :
(module Required.DATA_TEMPLATE) ->
(module Required.DATA_INJECTABLE with type t = 'a) ->
?snapshot:bool ->
?strict:bool ->
Path.t list ->
('a * string, 'a * string) Task.tchain_templates (module T) (module M) ?strict [list_of_path] is an arrow that apply a sequentially the list of path as a templates.
ie: chain_templates (module T) (module M) [a; b] is as_template (module T) (module M) ?strict a >>> as_template (module T) (module M) ?strict b.