package yocaml_eio

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type

Rexports Runtime to be used outside of the package.

include Yocaml.Required.RUNTIME with type 'a t = Eio_unix.Stdenv.base -> 'a
type runtime_error
type !'a t = Eio_unix.Stdenv.base -> 'a
val runtime_error_to_string : runtime_error -> string
val bind : ('a -> 'b t) -> 'a t -> 'b t
val return : 'a -> 'a t
val log : [ `App | `Debug | `Error | `Info | `Warning ] -> string -> unit t
val get_time : unit -> int t
val file_exists : on:[ `Source | `Target ] -> Yocaml__.Path.t -> bool t
val read_file : on:[ `Source | `Target ] -> Yocaml__.Path.t -> (string, runtime_error) Stdlib.result t
val get_mtime : on:[ `Source | `Target ] -> Yocaml__.Path.t -> (int, runtime_error) Stdlib.result t
val hash_content : string -> string t
val create_directory : on:[ `Source | `Target ] -> Yocaml__.Path.t -> (unit, runtime_error) Stdlib.result t
val write_file : on:[ `Source | `Target ] -> Yocaml__.Path.t -> string -> (unit, runtime_error) Stdlib.result t
val is_directory : on:[ `Source | `Target ] -> Yocaml__.Path.t -> bool t
val read_dir : on:[ `Source | `Target ] -> Yocaml__.Path.t -> (Yocaml__.Path.fragment list, runtime_error) Stdlib.result t
val exec : ?is_success:(int -> bool) -> string -> string list -> (string, runtime_error) Stdlib.result t
val to_eio_path : Eio_unix.Stdenv.base -> Yocaml.Path.t -> Eio.Fs.dir_ty Eio.Path.t

An helper for converting Yocaml.Path.t to Eio.Path.t.

OCaml

Innovation. Community. Security.