package MlFront_Thunk
Install
dune-project
Dependency
Authors
Maintainers
Sources
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
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
val longpath_capable_filepath :
absbasepath:MlFront_Core.FilePath.t ->
functions:[ `MlFront_ZipFile ] ->
MlFront_Core.FilePath.t ->
stringlongpath_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.
val remove_file_or_directory_recursively :
return:([> `Deleted | `Error of string ] -> 'a) ->
MlFront_Core.FilePath.t ->
'aval make_directory_recursively :
return:([> `Created | `Error of string ] -> 'a) ->
MlFront_Core.FilePath.t ->
'aval move_local_file :
return:([> `Error of string | `Moved ] -> 'a) ->
src_local_file:string ->
dst_local_file:string ->
'aval 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 ->
'atype index_value = {indexvalue_local_offset : int64;indexvalue_central_offset : int64;indexvalue_central_size : int64;(*The length of the central directory, extended records like Zip64, up to and including the end of central directory record.
*)indexvalue_checksum_blake2b256 : string;
}val index_local_zipfile :
return:((index_value, string) result -> 'a) ->
srczip:string ->
indexzip:string ->
unit ->
'aindex_local_zipfile ~return ~srczip ~indexzip ()
Spawning
module MakeRacyTestSpawner
(M : MlFront_Thunk.BuildConstraints.MONAD_PROMISE) :
MlFront_Thunk.ThunkSpawner.S with type 'a t = 'a M.tRacyTestSpawner is a functional pure-OCaml spawner that changes directories in a racy, thread-unsafe way.
Thunk I/O operations
module Make
(M : MlFront_Thunk.BuildConstraints.MONAD_PROMISE)
(S : MlFront_Thunk.ThunkSpawner.S with type 'a t = 'a M.t) :
sig ... end