sig
type descr = Unix.file_descr
type any_channel =
[ `InChannel of Pervasives.in_channel
| `OutChannel of Pervasives.out_channel ]
type gen_in_channel =
[ `InChannel of Pervasives.in_channel
| `InDescr of Channel.descr
| `InFd of int ]
type gen_out_channel =
[ `OutChannel of Pervasives.out_channel
| `OutDescr of Channel.descr
| `OutFd of int ]
type gen_channel =
[ `InChannel of Pervasives.in_channel
| `InDescr of Channel.descr
| `InFd of int
| `OutChannel of Pervasives.out_channel
| `OutDescr of Channel.descr
| `OutFd of int ]
type dup_in_source =
[ `Close
| `Filename of string
| `InChannel of Pervasives.in_channel
| `InDescr of Channel.descr
| `InFd of int
| `Null ]
type dup_out_source =
[ `Close
| `Filename of string
| `Filespec of string * Channel.clobber_spec
| `Null
| `OutChannel of Pervasives.out_channel
| `OutDescr of Channel.descr
| `OutFd of int ]
and clobber_spec = [ `Append | `AppendOnly | `Clobber | `NoClobber ]
type dup_source =
[ `Close
| `Filename of string
| `Filespec of string * Channel.clobber_spec
| `InChannel of Pervasives.in_channel
| `InDescr of Channel.descr
| `InFd of int
| `Null
| `OutChannel of Pervasives.out_channel
| `OutDescr of Channel.descr
| `OutFd of int ]
type dup_spec = (Channel.dup_source * Channel.gen_channel) list
type pipe_spec = Channel.gen_channel list
type procref = Proc.t option Pervasives.ref
val clobber : Channel.clobber_spec Pervasives.ref
val descr_of_gen : Channel.gen_channel -> Channel.descr
val descr_of_fd : int -> Channel.descr
val fd_of_descr : Channel.descr -> int
val open_file_in : string -> Pervasives.in_channel
val open_file_out : string -> Pervasives.out_channel
val null_in : unit -> Pervasives.in_channel
val null_out : unit -> Pervasives.out_channel
val close_in : Pervasives.in_channel -> unit
val close_out : Pervasives.out_channel -> unit
val close_gen : Channel.gen_channel -> unit
val dup2 : Channel.dup_source * Channel.gen_channel -> unit
val mov2 : Channel.dup_source * Channel.gen_channel -> unit
val with_dups : Channel.dup_spec -> (unit -> 'a) -> 'a
val dup_in : Channel.dup_in_source -> Pervasives.in_channel
val dup_out : Channel.dup_out_source -> Pervasives.out_channel
val open_thunk :
?pipes:Channel.pipe_spec ->
?dups:Channel.dup_spec ->
(unit -> unit) -> Proc.t * Channel.any_channel list
val open_thunk_in :
?procref:Channel.procref ->
?dups:Channel.dup_spec -> (unit -> unit) -> Pervasives.in_channel
val open_thunk_out :
?procref:Channel.procref ->
?dups:Channel.dup_spec -> (unit -> unit) -> Pervasives.out_channel
val open_thunk2 :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
(unit -> unit) -> Pervasives.in_channel * Pervasives.in_channel
val open_thunk3 :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
(unit -> unit) ->
Pervasives.out_channel * Pervasives.in_channel * Pervasives.in_channel
val open_command :
?pipes:Channel.pipe_spec ->
?dups:Channel.dup_spec -> string -> Proc.t * Channel.any_channel list
val open_command_in :
?procref:Channel.procref ->
?dups:Channel.dup_spec -> string -> Pervasives.in_channel
val open_command_out :
?procref:Channel.procref ->
?dups:Channel.dup_spec -> string -> Pervasives.out_channel
val open_command2 :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
string -> Pervasives.in_channel * Pervasives.in_channel
val open_command3 :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
string ->
Pervasives.out_channel * Pervasives.in_channel * Pervasives.in_channel
val open_program :
?pipes:Channel.pipe_spec ->
?dups:Channel.dup_spec ->
?path:bool ->
string ->
?argv0:string -> string list -> Proc.t * Channel.any_channel list
val open_program_in :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
?path:bool ->
string -> ?argv0:string -> string list -> Pervasives.in_channel
val open_program_out :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
?path:bool ->
string -> ?argv0:string -> string list -> Pervasives.out_channel
val open_program2 :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
?path:bool ->
string ->
?argv0:string ->
string list -> Pervasives.in_channel * Pervasives.in_channel
val open_program3 :
?procref:Channel.procref ->
?dups:Channel.dup_spec ->
?path:bool ->
string ->
?argv0:string ->
string list ->
Pervasives.out_channel * Pervasives.in_channel * Pervasives.in_channel
val string_of_channel : Pervasives.in_channel -> string
val string_of_command : ?procref:Channel.procref -> string -> string
val string_of_program :
?procref:Channel.procref ->
?path:bool -> string -> ?argv0:string -> string list -> string
val open_string_in : string -> Pervasives.in_channel
val with_out_string : (Pervasives.out_channel -> 'a) -> 'a * string
type directory
val opendir : string -> Channel.directory
val closedir : Channel.directory -> unit
val readdir : Channel.directory -> string
val rewinddir : Channel.directory -> unit
module Dup :
sig
type dup_arg = Channel.dup_source * Channel.gen_channel
val ( !% ) : Channel.descr -> int
val ( *<& ) :
Channel.gen_in_channel ->
Channel.dup_in_source -> Channel.Dup.dup_arg
val ( *< ) : Channel.gen_in_channel -> string -> Channel.Dup.dup_arg
val ( *>& ) :
Channel.gen_out_channel ->
Channel.dup_out_source -> Channel.Dup.dup_arg
val ( *> ) : Channel.gen_out_channel -> string -> Channel.Dup.dup_arg
val ( *>! ) : Channel.gen_out_channel -> string -> Channel.Dup.dup_arg
val ( *>? ) : Channel.gen_out_channel -> string -> Channel.Dup.dup_arg
val ( *>> ) : Channel.gen_out_channel -> string -> Channel.Dup.dup_arg
val ( *>>! ) : Channel.gen_out_channel -> string -> Channel.Dup.dup_arg
val ( %<& ) : int -> int -> Channel.Dup.dup_arg
val ( %< ) : int -> string -> Channel.Dup.dup_arg
val ( %>& ) : int -> int -> Channel.Dup.dup_arg
val ( %> ) : int -> string -> Channel.Dup.dup_arg
val ( %>! ) : int -> string -> Channel.Dup.dup_arg
val ( %>? ) : int -> string -> Channel.Dup.dup_arg
val ( %>> ) : int -> string -> Channel.Dup.dup_arg
val ( %>>! ) : int -> string -> Channel.Dup.dup_arg
val ( /<& ) :
Pervasives.in_channel -> Pervasives.in_channel -> Channel.Dup.dup_arg
val ( /< ) : Pervasives.in_channel -> string -> Channel.Dup.dup_arg
val ( />& ) :
Pervasives.out_channel ->
Pervasives.out_channel -> Channel.Dup.dup_arg
val ( /> ) : Pervasives.out_channel -> string -> Channel.Dup.dup_arg
val ( />! ) : Pervasives.out_channel -> string -> Channel.Dup.dup_arg
val ( />? ) : Pervasives.out_channel -> string -> Channel.Dup.dup_arg
val ( />> ) : Pervasives.out_channel -> string -> Channel.Dup.dup_arg
val ( />>! ) : Pervasives.out_channel -> string -> Channel.Dup.dup_arg
val ( *>% ) : Channel.gen_out_channel -> int -> Channel.Dup.dup_arg
val ( *>/ ) :
Channel.gen_out_channel ->
Pervasives.out_channel -> Channel.Dup.dup_arg
val ( %>* ) : int -> Channel.dup_out_source -> Channel.Dup.dup_arg
val ( %>/ ) : int -> Pervasives.out_channel -> Channel.Dup.dup_arg
val ( />* ) :
Pervasives.out_channel ->
Channel.dup_out_source -> Channel.Dup.dup_arg
val ( />% ) : Pervasives.out_channel -> int -> Channel.Dup.dup_arg
val ( *<% ) : Channel.gen_in_channel -> int -> Channel.Dup.dup_arg
val ( *</ ) :
Channel.gen_in_channel ->
Pervasives.in_channel -> Channel.Dup.dup_arg
val ( %<* ) : int -> Channel.dup_in_source -> Channel.Dup.dup_arg
val ( %</ ) : int -> Pervasives.in_channel -> Channel.Dup.dup_arg
val ( /<* ) :
Pervasives.in_channel -> Channel.dup_in_source -> Channel.Dup.dup_arg
val ( /<% ) : Pervasives.in_channel -> int -> Channel.Dup.dup_arg
end
end