Legend:
Library
Module
Module type
Parameter
Class
Class type
Library
Module
Module type
Parameter
Class
Class type
type t = byte_stream
val close : t -> unit
val of_chan : in_channel -> t
Make a buffered stream from the given channel.
val of_chan_close_noerr : in_channel -> t
Same as of_chan
but the close
method will never fail.
val of_bytes : ?i:int -> ?len:int -> bytes -> t
A stream that just returns the slice of bytes starting from i
and of length len
.
val with_file : string -> (t -> 'a) -> 'a
Open a file with given name, and obtain an input stream on its content. When the function returns, the stream (and file) are closed.