package stdcompat

  1. Overview
  2. Docs
type t = Stdlib.in_channel
  • since 4.14.0: type t = in_channel
type open_flag = Stdlib.In_channel.open_flag =
  1. | Open_rdonly
  2. | Open_wronly
  3. | Open_append
  4. | Open_creat
  5. | Open_trunc
  6. | Open_excl
  7. | Open_binary
  8. | Open_text
  9. | Open_nonblock
  • since 4.14.0:

type open_flag = In_channel.open_flag = | Open_rdonly | Open_wronly | Open_append | Open_creat | Open_trunc | Open_excl | Open_binary | Open_text | Open_nonblock

val stdin : t
  • since 4.14.0: val stdin : t
val open_bin : string -> t
  • since 4.14.0: val open_bin : string -> t
val open_text : string -> t
  • since 4.14.0: val open_text : string -> t
val open_gen : open_flag list -> int -> string -> t
  • since 4.14.0: val open_gen : open_flag list -> int -> string -> t
val with_open_bin : string -> (t -> 'a) -> 'a
  • since 4.14.0: val with_open_bin : string -> (t -> 'a) -> 'a
val with_open_text : string -> (t -> 'a) -> 'a
  • since 4.14.0: val with_open_text : string -> (t -> 'a) -> 'a
val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a
  • since 4.14.0:

val with_open_gen : open_flag list -> int -> string -> (t -> 'a) -> 'a

val seek : t -> int64 -> unit
  • since 4.14.0: val seek : t -> int64 -> unit
val pos : t -> int64
  • since 4.14.0: val pos : t -> int64
val length : t -> int64
  • since 4.14.0: val length : t -> int64
val close : t -> unit
  • since 4.14.0: val close : t -> unit
val close_noerr : t -> unit
  • since 4.14.0: val close_noerr : t -> unit
val input_char : t -> char option
  • since 4.14.0: val input_char : t -> char option
val input_byte : t -> int option
  • since 4.14.0: val input_byte : t -> int option
val input_line : t -> string option
  • since 4.14.0: val input_line : t -> string option
val input : t -> bytes -> int -> int -> int
  • since 4.14.0: val input : t -> bytes -> int -> int -> int
val really_input : t -> bytes -> int -> int -> unit option
  • since 4.14.0: val really_input : t -> bytes -> int -> int -> unit option
val really_input_string : t -> int -> string option
  • since 4.14.0: val really_input_string : t -> int -> string option
val input_all : t -> string
  • since 4.14.0: val input_all : t -> string
val set_binary_mode : t -> bool -> unit
  • since 4.14.0: val set_binary_mode : t -> bool -> unit
OCaml

Innovation. Community. Security.