package MlFront_Thunk

  1. Overview
  2. Docs
Describes and runs reproducible units of work called thunks

Install

dune-project
 Dependency

Authors

Maintainers

Sources

MlFront.tar.gz
md5=561d9b7dfc392fcd7413737ac1f6071a
sha512=ec9b2fe9ac45b8429dda4f155f56f73410d1eb12b879e8f826756f2fc3d8fa00d439a75fbd48be9f6dca6cbf3ca691e2b367cd55d227d9a81f77e95cff6d9346

doc/MlFront_Thunk.ThunkIoDisk/MlFront_Thunk_IoDisk/ThunkIoDisk/index.html

Module MlFront_Thunk_IoDisk.ThunkIoDiskSource

Disk I/O operations for thunks that uses the OCaml unix library and the MlFront_ZipFile library.

Initialization

Sourceval set_io_rng : (unit -> int64) -> unit

set_io_rng rng sets the random number generator for I/O operations to rng, for use in creating temporary directory names.

File and directory operations

Sourceval longpath_capable_filepath : absbasepath:MlFront_Core.FilePath.t -> functions:[ `MlFront_ZipFile ] -> MlFront_Core.FilePath.t -> string

longpath_capable_filepath ~absbasepath ~typ fp converts fp into a file path on Windows that can exceed MAX_PATH 260 characters if the file path is given to MlFront_ZipFile functions. On Unix fp is kept as-is.

The functions argument specifies which functions will be used with the returned longpath capable file path. Windows has a couple different forms of long paths; sometimes only one works with a given function.

absbasepath is the absolute base path against which fp is resolved. If fp is already absolute, absbasepath is ignored.

Currently only `MlFront_ZipFile is supported.

Sourceval remove_file_or_directory_recursively : return:([> `Deleted | `Error of string ] -> 'a) -> MlFront_Core.FilePath.t -> 'a
Sourceval make_directory_recursively : return:([> `Created | `Error of string ] -> 'a) -> MlFront_Core.FilePath.t -> 'a
Sourceval delete_local_file : return:([> `Deleted | `Error of string ] -> 'a) -> string -> 'a
Sourceval move_local_file : return:([> `Error of string | `Moved ] -> 'a) -> src_local_file:string -> dst_local_file:string -> 'a
Sourceval checksum_local_file : ?dos2unix:unit -> ?start_at:int64 -> ?len:int64 -> algo:[ `None | `BLAKE2b_256 | `SHA1 | `SHA256 ] -> return:([> `Checksum of string * int64 | `Error of string ] -> 'a) -> string -> 'a
Sourcetype index_value = {
  1. indexvalue_local_offset : int64;
  2. indexvalue_central_offset : int64;
  3. indexvalue_central_size : int64;
    (*

    The length of the central directory, extended records like Zip64, up to and including the end of central directory record.

    *)
  4. indexvalue_checksum_blake2b256 : string;
}
Sourceval index_local_zipfile : return:((index_value, string) result -> 'a) -> srczip:string -> indexzip:string -> unit -> 'a

index_local_zipfile ~return ~srczip ~indexzip ()

Spawning

RacyTestSpawner is a functional pure-OCaml spawner that changes directories in a racy, thread-unsafe way.

Thunk I/O operations