Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
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.
include Ppx_compare_lib.Equal.S with type t := t
val stdin : t
val create : Base.string -> t
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