Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
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 fifo
s 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
Some functions are not implemented.
type t = Private.Peekable_in_channel.t
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
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