package MlFront_Thunk

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

Module ThunkIoDisk.MakeSource

Parameters

module S : MlFront_Thunk.ThunkSpawner.S with type 'a t = 'a M.t

Signature

include sig ... end
Sourcetype visitor =
  1. | Visitor : {
    1. init : 'acc;
    2. file : 'acc -> file_object -> ('acc * [ `Next | `Stop ]) M.t;
    3. directory : 'acc -> directory_object -> ('acc * [ `Descend | `SkipDir | `Stop ]) M.t;
    4. finished : 'acc -> unit M.t;
    } -> visitor
Sourceand file_object = private {
  1. file_path : MlFront_Core.FilePath.t;
  2. file_origin : string;
  3. parent_directory : directory_object;
  4. is_local_file : bool;
  5. file_object_of_local_path : MlFront_Core.FilePath.t -> (file_object, string) result M.t;
  6. open_for_writing : unit -> [ `Error of string | `Handle of int64 | `IsDirectory of directory_object ] M.t;
  7. open_for_reading : unit -> [ `Error of string | `Handle of int64 | `IsDirectory of directory_object ] M.t;
  8. probe_eof : int64 -> (bool, string) result M.t;
  9. read_some : int64 -> bytes -> int -> int -> [ `Eof | `Error of string | `ReadBytes of int ] M.t;
  10. write_all : int64 -> string -> int -> int -> [ `Error of string | `WroteBytes ] M.t;
  11. close : int64 -> unit M.t;
  12. read_all : unit -> [ `Content of string | `Error of string | `ExceededSizeLimit of int64 ] M.t;
  13. prepare_as_copy_destination : unit -> [ `Error of string | `Ready ] M.t;
  14. anonymous_file : string -> string -> [ `Anonymous of file_object | `Error of string ] M.t;
  15. delete_file : unit -> [ `Deleted | `Error of string ] M.t;
  16. delete_file_async : unit -> unit;
  17. move_and_own_file : file_object -> [ `Error of string | `Moved ] M.t;
  18. checksum_file : dos2unix:bool -> start_at:int64 -> ?len:??? -> algo:[ `BLAKE2b_256 | `None | `SHA1 | `SHA256 ] -> unit -> [ `Checksum of string * int64 | `Error of string ] M.t;
}
Sourceand directory_object = private {
  1. dir_path : MlFront_Core.FilePath.t;
  2. dir_origin : string;
  3. directory_object_of_local_path : MlFront_Core.FilePath.t -> (directory_object, string) result M.t;
  4. child_if_exists : string -> (file_object, directory_object) Either.t option M.t;
  5. create_directory : unit -> [ `Created | `Error of string ] M.t;
  6. create_directory_async : unit -> unit;
  7. anonymous_directory : string -> string -> [ `Anonymous of directory_object | `Error of string ] M.t;
  8. visit_directory : visitor -> unit M.t;
  9. delete_directory : unit -> [ `Deleted | `Error of string ] M.t;
  10. delete_directory_async : unit -> unit;
  11. zip_directory_nonatomic : ?intermediate:??? -> dest_file:file_object -> unit -> [ `Error of string | `Zipped ] M.t;
  12. spawn_in_directory : ?stdout:??? -> ?stderr:??? -> ?progress:??? -> unix_cmdline:(MlFront_Core.FilePath.t * string list) -> windows_appname:string -> windows_cmdline:string -> envmods:MlFront_Core.EnvMods.t -> unit -> [ `Error of string | `Exited of int | `Signaled of int | `Stopped of int ] M.t;
  13. interactive_shell_in_directory : ?promptname:??? -> envmods:MlFront_Core.EnvMods.t -> unit -> [ `Error of string | `Exited of int | `Signaled of int | `Stopped of int ] M.t;
}
Sourceval generic_file : file_path:MlFront_Core.FilePath.t -> origin:string -> parent_directory:directory_object -> is_local_file:bool -> file_object_of_local_path: (MlFront_Core.FilePath.t -> (file_object, string) result M.t) -> open_for_writing: (unit -> [ `Error of string | `Handle of int64 | `IsDirectory of directory_object ] M.t) -> open_for_reading: (unit -> [ `Error of string | `Handle of int64 | `IsDirectory of directory_object ] M.t) -> probe_eof:(int64 -> (bool, string) result M.t) -> read_some: (int64 -> bytes -> int -> int -> [ `Eof | `Error of string | `ReadBytes of int ] M.t) -> read_all: (unit -> [ `Content of string | `Error of string | `ExceededSizeLimit of int64 ] M.t) -> write_all: (int64 -> string -> int -> int -> [ `Error of string | `WroteBytes ] M.t) -> close:(int64 -> unit M.t) -> prepare_as_copy_destination:(unit -> [ `Error of string | `Ready ] M.t) -> anonymous_file: (string -> string -> [ `Anonymous of file_object | `Error of string ] M.t) -> delete_file:(unit -> [ `Deleted | `Error of string ] M.t) -> delete_file_async:(unit -> unit) -> move_and_own_file:(file_object -> [ `Error of string | `Moved ] M.t) -> checksum_file: (dos2unix:bool -> start_at:int64 -> ?len:??? -> algo:[ `BLAKE2b_256 | `None | `SHA1 | `SHA256 ] -> unit -> [ `Checksum of string * int64 | `Error of string ] M.t) -> unit -> file_object
Sourceval generic_dir : dir_path:MlFront_Core.FilePath.t -> origin:string -> directory_object_of_local_path: (MlFront_Core.FilePath.t -> (directory_object, string) result M.t) -> child_if_exists: (string -> (file_object, directory_object) Either.t option M.t) -> create_directory:(unit -> [ `Created | `Error of string ] M.t) -> create_directory_async:(unit -> unit) -> anonymous_directory: (string -> string -> [ `Anonymous of directory_object | `Error of string ] M.t) -> visit_directory:(visitor -> unit M.t) -> delete_directory:(unit -> [ `Deleted | `Error of string ] M.t) -> delete_directory_async:(unit -> unit) -> zip_directory_nonatomic: (?intermediate:??? -> dest_file:file_object -> unit -> [ `Error of string | `Zipped ] M.t) -> spawn_in_directory: (?stdout:??? -> ?stderr:??? -> ?progress:??? -> unix_cmdline:(MlFront_Core.FilePath.t * string list) -> windows_appname:string -> windows_cmdline:string -> envmods:MlFront_Core.EnvMods.t -> unit -> [ `Error of string | `Exited of int | `Signaled of int | `Stopped of int ] M.t) -> interactive_shell_in_directory: (?promptname:??? -> envmods:MlFront_Core.EnvMods.t -> unit -> [ `Error of string | `Exited of int | `Signaled of int | `Stopped of int ] M.t) -> unit -> directory_object
Sourceval inmemory_file : origin:MlFront_Core.FilePath.t -> string -> file_object
Sourceval inmemory_dir : origin:MlFront_Core.FilePath.t -> unit -> directory_object
Sourceval file_origin : file_object -> string
Sourceval directory_origin : directory_object -> string
Sourceval directory_object_of_local_path : peer:directory_object -> MlFront_Core.FilePath.t -> (directory_object, string) result M.t
Sourceval child_if_exists : directory_object -> string -> (file_object, directory_object) Either.t option M.t
Sourceval read_all : file_object -> [ `Content of string | `Error of string | `ExceededSizeLimit of int64 ] M.t
Sourceval copy : ?dos2unix:??? -> ?on_write_total:??? -> src:file_object -> dest:file_object -> unit -> [ `Copied | `DestinationIsDirectory of directory_object | `Error of string | `SourceIsDirectory of directory_object ] M.t
Sourceval copy_or_fail : ?dos2unix:??? -> ?on_write_total:??? -> src:file_object -> dest:file_object -> on_error:(string -> 'a M.t) -> 'a M.t -> 'a M.t
Sourceval copy_but_error_if_dest_is_dir : ?dos2unix:??? -> src:file_object -> dest:file_object -> unit -> [ `Copied | `Error of string | `SourceIsDirectory of directory_object ] M.t
Sourceval checksum_file : ?dos2unix:??? -> ?start_at:??? -> ?len:??? -> algo:[ `BLAKE2b_256 | `None | `SHA1 | `SHA256 ] -> file_object -> [ `Checksum of string * int64 | `Error of string ] M.t
Sourceval replace_all_bytes : file_object -> bytes -> int -> int -> [ `Error of string | `IsDirectory of directory_object | `WroteBytes ] M.t
Sourceval replace_all_string : file_object -> string -> int -> int -> [ `Error of string | `IsDirectory of directory_object | `WroteBytes ] M.t
Sourceval anonymous_file : ?prefix:??? -> suffix:string -> file_object -> [ `Anonymous of file_object | `Error of string ] M.t
Sourceval delete_file : file_object -> [ `Deleted | `Error of string ] M.t
Sourceval delete_file_async : file_object -> unit
Sourceval move_file : src:file_object -> dest:file_object -> [ `Error of string | `Moved ] M.t
Sourceval parent_directory : file_object -> directory_object
Sourceval is_local_file : file_object -> bool
Sourceval create_directory : directory_object -> [ `Created | `Error of string ] M.t
Sourceval create_directory_async : directory_object -> unit
Sourceval anonymous_directory : ?prefix:??? -> suffix:string -> directory_object -> [ `Anonymous of directory_object | `Error of string ] M.t
Sourceval visit_directory : directory_object -> visitor -> unit M.t
Sourceval delete_directory : directory_object -> [ `Deleted | `Error of string ] M.t
Sourceval delete_directory_async : directory_object -> unit
Sourceval spawn_in_directory : ?stdout:??? -> ?stderr:??? -> ?progress:??? -> unix_cmdline:(MlFront_Core.FilePath.t * string list) -> windows_appname:string -> windows_cmdline:string -> cwd:directory_object -> envmods:MlFront_Core.EnvMods.t -> unit -> [ `Error of string | `Exited of int | `Signaled of int | `Stopped of int ] M.t
Sourceval interactive_shell_in_directory : ?promptname:??? -> envmods:MlFront_Core.EnvMods.t -> cwd:directory_object -> unit -> [ `Error of string | `Exited of int | `Signaled of int | `Stopped of int ] M.t
Sourceval zip_directory : srcdir:directory_object -> destzip:file_object -> unit -> (MlFront_Thunk__ThunkIo.file_digest, string) result M.t
Sourceval copy_file_or_dir_to_file_and_sha256_or_fail : ?dos2unix:??? -> ?intermediate:??? -> src:file_object -> dest:file_object -> on_error:(string -> 'b M.t) -> (string -> int64 -> 'b M.t) -> 'b M.t
Sourcetype handle
Sourceval file_object_of_local_path : peer:file_object -> MlFront_Core.FilePath.t -> (file_object, string) result M.t
Sourceval close : handle -> unit M.t
Sourceval open_for_reading : file_object -> [ `Error of string | `Handle of handle | `IsDirectory ] M.t
Sourceval probe_eof : handle -> (bool, string) result M.t
Sourceval read_some : handle -> bytes -> int -> int -> [ `Eof | `Error of string | `ReadBytes of int ] M.t
Sourcetype 'a t = 'a M.t
Sourceval open_for_writing : file_object -> [ `Error of string | `Handle of handle | `IsDirectory ] t
Sourceval write_all : handle -> string -> int -> int -> [ `Error of string | `WroteBytes ] t