package shcaml

  1. Overview
  2. Docs
type descr = Unix.file_descr
type any_channel = [
  1. | `InChannel of Stdlib.in_channel
  2. | `OutChannel of Stdlib.out_channel
]
type gen_in_channel = [
  1. | `InChannel of Stdlib.in_channel
  2. | `InDescr of descr
  3. | `InFd of int
]
type gen_out_channel = [
  1. | `OutChannel of Stdlib.out_channel
  2. | `OutDescr of descr
  3. | `OutFd of int
]
type gen_channel = [
  1. | `InChannel of Stdlib.in_channel
  2. | `InDescr of descr
  3. | `InFd of int
  4. | `OutChannel of Stdlib.out_channel
  5. | `OutDescr of descr
  6. | `OutFd of int
]
type dup_in_source = [
  1. | `Close
  2. | `Filename of string
  3. | `InChannel of Stdlib.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 Stdlib.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 Stdlib.in_channel
  5. | `InDescr of descr
  6. | `InFd of int
  7. | `Null
  8. | `OutChannel of Stdlib.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 Stdlib.ref
val clobber : clobber_spec Stdlib.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 -> Stdlib.in_channel
val open_file_out : string -> Stdlib.out_channel
val null_in : unit -> Stdlib.in_channel
val null_out : unit -> Stdlib.out_channel
val close_in : Stdlib.in_channel -> unit
val close_out : Stdlib.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 -> Stdlib.in_channel
val dup_out : dup_out_source -> Stdlib.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) -> Stdlib.in_channel
val open_thunk_out : ?procref:procref -> ?dups:dup_spec -> (unit -> unit) -> Stdlib.out_channel
val open_thunk2 : ?procref:procref -> ?dups:dup_spec -> (unit -> unit) -> Stdlib.in_channel * Stdlib.in_channel
val open_thunk3 : ?procref:procref -> ?dups:dup_spec -> (unit -> unit) -> Stdlib.out_channel * Stdlib.in_channel * Stdlib.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 -> Stdlib.in_channel
val open_command_out : ?procref:procref -> ?dups:dup_spec -> string -> Stdlib.out_channel
val open_command2 : ?procref:procref -> ?dups:dup_spec -> string -> Stdlib.in_channel * Stdlib.in_channel
val open_command3 : ?procref:procref -> ?dups:dup_spec -> string -> Stdlib.out_channel * Stdlib.in_channel * Stdlib.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 -> Stdlib.in_channel
val open_program_out : ?procref:procref -> ?dups:dup_spec -> ?path:bool -> string -> ?argv0:string -> string list -> Stdlib.out_channel
val open_program2 : ?procref:procref -> ?dups:dup_spec -> ?path:bool -> string -> ?argv0:string -> string list -> Stdlib.in_channel * Stdlib.in_channel
val open_program3 : ?procref:procref -> ?dups:dup_spec -> ?path:bool -> string -> ?argv0:string -> string list -> Stdlib.out_channel * Stdlib.in_channel * Stdlib.in_channel
val string_of_channel : Stdlib.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 -> Stdlib.in_channel
val with_out_string : (Stdlib.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 : Stdlib.Format.formatter -> descr -> unit
val pp_in_channel : Stdlib.Format.formatter -> Stdlib.in_channel -> unit
val pp_out_channel : Stdlib.Format.formatter -> Stdlib.out_channel -> unit
OCaml

Innovation. Community. Security.