package shcaml

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