Module Pvem_lwt_unix.System (.ml)

module System: sig .. end

val wrap_deferred_system : 'a ->
(unit -> 'b Pvem_lwt_unix.Deferred_result.deferred) ->
('b, [> `System of 'a * [> `Exn of exn ] ]) Pvem_lwt_unix.Deferred_result.t
val fail_sys : 'a -> ('b, [> `System of 'a ]) Pvem_lwt_unix.Deferred_result.t
module Shell: sig .. end
val sleep : float ->
(unit, [> `System of [> `Sleep of float ] * [> `Exn of exn ] ])
Pvem_lwt_unix.Deferred_result.t
val with_timeout : float ->
f:(unit ->
('a,
[> `System of [> `With_timeout of float ] * [> `Exn of exn ]
| `Timeout of float ]
as 'b)
Pvem.Result.t Lwt.t) ->
('a, 'b) Pvem.Result.t Lwt.t
val mkdir_or_fail : ?perm:Lwt_unix.file_perm ->
string ->
(unit,
[> `System of
[> `Make_directory of string ] *
[> `Already_exists
| `Exn of exn
| `Wrong_access_rights of Lwt_unix.file_perm ] ])
Pvem.Result.t Lwt.t
val mkdir_even_if_exists : ?perm:Lwt_unix.file_perm ->
string ->
(unit,
[> `System of
[> `Make_directory of string ] *
[> `Exn of exn | `Wrong_access_rights of Lwt_unix.file_perm ] ])
Pvem.Result.t Lwt.t
val make_new_directory : ?perm:Lwt_unix.file_perm ->
string ->
(unit,
[> `System of
[> `Make_directory of string ] *
[> `Already_exists
| `Exn of exn
| `Wrong_access_rights of Lwt_unix.file_perm ] ])
Pvem.Result.t Lwt.t
val ensure_directory_path : ?perm:Lwt_unix.file_perm ->
string ->
(unit,
[> `System of
[> `Make_directory of string ] *
[> `Exn of exn | `Wrong_access_rights of Lwt_unix.file_perm ] ])
Pvem_lwt_unix.Deferred_result.t
type file_info = [ `Absent
| `Block_device
| `Character_device
| `Directory
| `Fifo
| `Regular_file of int
| `Socket
| `Symlink of string ]
val lwt_unix_readlink : string -> string Lwt.t
val file_info : ?follow_symlink:bool ->
string ->
([> `Absent
| `Block_device
| `Character_device
| `Directory
| `Fifo
| `Regular_file of int
| `Socket
| `Symlink of string ],
[> `System of [> `File_info of string ] * [> `Exn of exn ] ])
Pvem_lwt_unix.Deferred_result.t
val list_directory : string ->
[> `Stream of
unit ->
(string option,
[> `System of [> `List_directory of string ] * [> `Exn of exn ] ])
Pvem_lwt_unix.Deferred_result.t ]
val remove : string ->
(unit,
[> `System of
[> `File_info of string | `List_directory of string | `Remove of string ] *
[> `Exn of exn ] ])
Pvem_lwt_unix.Deferred_result.t
val make_symlink : target:string ->
link_path:string ->
(unit,
[> `System of
[> `Make_symlink of string * string ] *
[> `Exn of exn | `File_exists of string ] ])
Pvem_lwt_unix.Deferred_result.t
type file_destination = [ `Into of string | `Onto of string ] 
val path_of_destination : src:string -> dst:[< `Into of string | `Onto of string ] -> string
val copy : ?ignore_strange:bool ->
?symlinks:[< `Fail | `Follow | `Redo > `Fail ] ->
?buffer_size:int ->
?if_exists:[< `Fail | `Overwrite | `Update > `Fail ] ->
src:string ->
[< `Into of string | `Onto of string & string > `Into ] ->
(unit,
[> `System of
[> `Copy of string
| `File_info of string
| `List_directory of string
| `Make_directory of string
| `Make_symlink of string * string
| `Remove of string ] *
[> `Already_exists
| `Exn of exn
| `File_exists of string
| `File_not_found of string
| `IO of [> `File_exists of string | `Wrong_path of string ]
| `Not_a_directory of string
| `Wrong_access_rights of Lwt_unix.file_perm
| `Wrong_file_kind of
string *
[> `Block_device
| `Character_device
| `Fifo
| `Socket
| `Symlink of string ] ] ])
Pvem_lwt_unix.Deferred_result.t
val move_in_same_device : ?if_exists:[> `Fail ] ->
src:string ->
[< `Into of string | `Onto of string ] ->
([> `Moved | `Must_copy ],
[> `System of
[> `File_info of string | `Move of string ] *
[> `Exn of exn | `File_exists of string ] ])
Pvem_lwt_unix.Deferred_result.t
val move : ?ignore_strange:bool ->
?symlinks:[< `Fail | `Follow | `Redo > `Fail ] ->
?buffer_size:int ->
?if_exists:[< `Fail | `Overwrite | `Update > `Fail ] ->
src:string ->
[< `Into of string | `Onto of string & string > `Into ] ->
(unit,
[> `System of
[> `Copy of string
| `File_info of string
| `List_directory of string
| `Make_directory of string
| `Make_symlink of string * string
| `Move of string
| `Remove of string ] *
[> `Already_exists
| `Exn of exn
| `File_exists of string
| `File_not_found of string
| `IO of [> `File_exists of string | `Wrong_path of string ]
| `Not_a_directory of string
| `Wrong_access_rights of Lwt_unix.file_perm
| `Wrong_file_kind of
string *
[> `Block_device
| `Character_device
| `Fifo
| `Socket
| `Symlink of string ] ] ])
Pvem_lwt_unix.Deferred_result.t
type file_tree = [ `Leaf of string * file_info
| `Node of string * file_tree list ]
val file_tree : ?follow_symlinks:bool ->
string ->
([> `Leaf of
string *
[> `Block_device
| `Character_device
| `Fifo
| `Regular_file of int
| `Socket
| `Symlink of string ]
| `Node of string * 'a list ]
as 'a,
[> `System of
[> `File_info of string
| `File_tree of string
| `List_directory of string ] *
[> `Exn of exn | `File_not_found of string ] ])
Pvem_lwt_unix.Deferred_result.t
val file_info_to_string : [< `Absent
| `Block_device
| `Character_device
| `Directory
| `Fifo
| `Regular_file of int
| `Socket
| `Symlink of string ] ->
string
val error_to_string : [< `Shell of
string *
[< `Exited of int | `Exn of exn | `Signaled of int | `Stopped of int ]
| `System of
[< `Copy of string
| `File_info of string
| `File_tree of string
| `List_directory of string
| `Make_directory of string
| `Make_symlink of string * string
| `Move of string
| `Remove of string ] *
[< `Already_exists
| `Exn of exn
| `File_exists of string
| `File_not_found of string
| `IO of
[< `Exn of exn
| `File_exists of string
| `Read_file_exn of string * exn
| `Write_file_exn of string * exn
| `Wrong_path of string ]
| `Not_a_directory of string
| `Wrong_access_rights of int
| `Wrong_file_kind of
string *
[< `Absent
| `Block_device
| `Character_device
| `Directory
| `Fifo
| `Regular_file of int
| `Socket
| `Symlink of string ]
| `Wrong_path of string ] ] ->
string