IO.OutputOutput channel (byte sink)
include module type of struct include Iostream.Out_buf endclass type t = object ... endAn output stream, ie. a place into which we can write bytes, with a buffer to amortize the cost of operations.
class type t_seekable = object ... endval create :
?flush:(unit -> unit) ->
?close:(unit -> unit) ->
output_char:(char -> unit) ->
output:(bytes -> int -> int -> unit) ->
unit ->
tCreate a new output stream from raw components.
val dummy : tDummy output, drops everything written to it.
class virtual t_from_output : ?bytes:bytes -> unit -> object ... endMake a bufferized output from a non bufferized output+close.
class bufferized : ?bytes:bytes -> Iostream.Out.t -> tval bufferized : ?bytes:bytes -> Iostream.Out.t -> tclass of_out_channel : ?close_noerr:bool -> out_channel -> t_seekableval of_out_channel : ?close_noerr:bool -> out_channel -> t_seekableWrap an out channel.
class of_buffer : Stdlib.Buffer.t -> tval of_buffer : Stdlib.Buffer.t -> tof_buffer buf is an output channel that writes directly into buf. flush and close have no effect.
class open_file : ?close_noerr:bool -> ?mode:int -> ?flags:open_flag list -> string ->
t_seekableval open_file :
?close_noerr:bool ->
?mode:int ->
?flags:open_flag list ->
string ->
t_seekableopen_file file creates an out stream writing into the given file.
val with_open_file :
?close_noerr:bool ->
?mode:int ->
?flags:open_flag list ->
string ->
(t_seekable -> 'a) ->
'aval output_char : t -> char -> unitOutput a single char
val output : t -> bytes -> int -> int -> unitWrite the slice of bytes.
val close : t -> unitClose the stream. Idempotent.
val flush : t -> unitEnsure the bytes written so far are indeed written to the underlying storage/network socket/… and are not just sitting in a buffer.
val output_string : t -> string -> unitOutput the whole string.
val output_line : t -> string -> unitOutput the whole string followed by '\n'.
val output_lines : t -> string Stdlib.Seq.t -> unitOutput a series of lines, each terminated by '\n'.
val output_int : t -> int -> unitOutput an integer in decimal notation.
tee ocs is an output that accepts bytes and writes them to every output in ocs. When closed, it closes all elements of oc.
class of_unix_fd : ?close_noerr:bool option -> closed:bool ref -> buf:Slice.t -> Unix.file_descr ->
tval output_buf : t -> Buf.t -> unit