package yocaml_git
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=0237452eeba7ad902bc742b0bb038b8b8c8e8ce470f05bc42357c5b408e2b451
sha512=0a7df3e9ddd8643388282e5c7cb423b5ec9767cca29d696d2c242d6a35ba776cc4a1e8b4cd448af0f8c4b372eb9b1cb279f0d7b381594defb7fa5e8f57e94973
doc/yocaml_git/Yocaml_git/From_identity/argument-1-Source/index.html
Parameter From_identity.Source
Each command is wrapped in a value of type 'a t, making it possible to build runtimes wrapped in monads (for example, Git/Irmin, which are currently based on Lwt).
val runtime_error_to_string : runtime_error -> stringConverts a runtime error into a character string for diagnosis.
log level message log a message with a given message.
val get_time : unit -> int tget_time () returns the current timestamp.
val file_exists : on:[ `Source | `Target ] -> Yocaml.Path.t -> bool tfile_exists ~on:source -> path returns true if the file exists, false otherwise.
val read_file :
on:[ `Source | `Target ] ->
Yocaml.Path.t ->
(string, runtime_error) result tread_file ~on:source -> path returns the content of a file.
val get_mtime :
on:[ `Source | `Target ] ->
Yocaml.Path.t ->
(int, runtime_error) result tget_mtime ~on:source path returns the modification time of a file.
val hash_content : string -> string thash_content str hash a content.
val create_directory :
on:[ `Source | `Target ] ->
Yocaml.Path.t ->
(unit, runtime_error) result tcreate_directory ~on path create a directory.
val write_file :
on:[ `Source | `Target ] ->
Yocaml.Path.t ->
string ->
(unit, runtime_error) result twrite_file ~on:source path content write a file.
val is_directory : on:[ `Source | `Target ] -> Yocaml.Path.t -> bool tis_directory ~on:source path returns true if the given path is a directory, false otherwise.
val is_file : on:[ `Source | `Target ] -> Yocaml.Path.t -> bool tis_file ~on:source path returns true if the given path is a file, false otherwise.
val read_dir :
on:[ `Source | `Target ] ->
Yocaml.Path.t ->
(Yocaml.Path.fragment list, runtime_error) result tread_dir ~on:source path returns a list of filename (fragment) of a given directory.
val exec :
?is_success:(int -> bool) ->
string ->
string list ->
(string, runtime_error) result texec ?is_success prog ?args will executes prog ...args. 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.
printing on standard output is returned.