package bio_io

  1. Overview
  2. Docs
include module type of struct include Private.Peekable_in_channel end

A wrapper of Jane Street's Stdio.In_channel. Add's peek_char and peek_line functions that work on fifos as well as regular files.

Used internally for bio input channels so that you can pipe directly from gzip even in channels that need peeking.

Differences from Stdio.In_channel

  • No binary mode

Some functions are not implemented.

  • input
  • really_input
  • really_input_exn
  • input_char
  • input_byte
  • input_binary_int
  • unsafe_input_value
  • input_buffer
  • seek
  • pos
  • length
  • set_binary_mode_out
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
val stdin : t
val create : Base.string -> t
val close : t -> Base.unit
val with_file : Base.string -> f:(t -> 'a) -> 'a
val input_all : t -> Base.string
val input_line : ?fix_win_eol:Base.bool -> t -> Base.string Base.option
val input_line_exn : ?fix_win_eol:Base.bool -> t -> Base.string
val fold_lines : ?fix_win_eol:Base.bool -> t -> init:'a -> f:('a -> Base.string -> 'a) -> 'a
val input_lines : ?fix_win_eol:Base.bool -> t -> Base.string Base.list
val iter_lines : ?fix_win_eol:Base.bool -> t -> f:(Base.string -> Base.unit) -> Base.unit
val read_lines : ?fix_win_eol:Base.bool -> Base.string -> Base.string Base.list
val read_all : Base.string -> Base.string

Both peek functions are safe to call in the context of one of the iterator functions.

val peek_char : ?fix_win_eol:Base.bool -> t -> Base.char Base.option
val peek_line : ?fix_win_eol:Base.bool -> t -> Base.string Base.option
type record = Record.t
val input_record : t -> Record.t option
OCaml

Innovation. Community. Security.