package bio_io

  1. Overview
  2. Docs

Module Private.Peekable_in_channelSource

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
Sourcetype t
Sourceval equal : t -> t -> Base.bool
Sourceval stdin : t
Sourceval create : Base.string -> t
Sourceval close : t -> Base.unit
Sourceval with_file : Base.string -> f:(t -> 'a) -> 'a
Sourceval input_all : t -> Base.string
Sourceval input_line : ?fix_win_eol:Base.bool -> t -> Base.string Base.option
Sourceval input_line_exn : ?fix_win_eol:Base.bool -> t -> Base.string
Sourceval fold_lines : ?fix_win_eol:Base.bool -> t -> init:'a -> f:('a -> Base.string -> 'a) -> 'a
Sourceval input_lines : ?fix_win_eol:Base.bool -> t -> Base.string Base.list
Sourceval iter_lines : ?fix_win_eol:Base.bool -> t -> f:(Base.string -> Base.unit) -> Base.unit
Sourceval read_lines : ?fix_win_eol:Base.bool -> Base.string -> Base.string Base.list
Sourceval read_all : Base.string -> Base.string

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

Sourceval peek_char : ?fix_win_eol:Base.bool -> t -> Base.char Base.option
Sourceval peek_line : ?fix_win_eol:Base.bool -> t -> Base.string Base.option
OCaml

Innovation. Community. Security.