module Lwt_text:sig..end
Lwt_io) plus a character
encoding.
It has almost the same interface as Lwt_io except that it
uses Text.t in place of string and char
type 'mode channel
typeinput_channel =Lwt_io.input channel
typeoutput_channel =Lwt_io.output channel
val make : ?strict:bool ->
?encoding:Encoding.t -> 'a Lwt_io.channel -> 'a channelmake ?strict ?encoding ch creates a text channel from a byte
channel.strict : tell whether encoding/decoding must be ``strict'',
which whether the encoder/decoder should fail on invalid
sequence. In non-strict mode, it transparently fallback to
ISO-8859-15. By the way it is ensured that read* functions
always returns valid UTF-8 encoded text. strict defaults to
false.encoding : is the character encoding used for the
channel. It defaults to Encoding.system.val byte_channel : 'a channel -> 'a Lwt_io.channelbyte_channel ch returns the underlying byte channel of a text
channelval encoding : 'a channel -> Encoding.tencoding ch returns the character encoding of a channel.val flush : output_channel -> unit Lwt.tval close : 'a channel -> unit Lwt.tval atomic : ('a channel -> 'b Lwt.t) -> 'a channel -> 'b Lwt.tval stdin : input_channelval stdout : output_channelval stderr : output_channelval zero : input_channelval null : output_channelval read_char : input_channel -> Text.t Lwt.tval read_char_opt : input_channel -> Text.t option Lwt.tval read_chars : input_channel -> Text.t Lwt_stream.tval read_line : input_channel -> Text.t Lwt.tval read_line_opt : input_channel -> Text.t option Lwt.tval read_lines : input_channel -> Text.t Lwt_stream.tval read : ?count:int -> input_channel -> Text.t Lwt.tval write_char : output_channel -> Text.t -> unit Lwt.tval write_chars : output_channel -> Text.t Lwt_stream.t -> unit Lwt.tval write : output_channel -> Text.t -> unit Lwt.tval write_line : output_channel -> Text.t -> unit Lwt.tval write_lines : output_channel -> Text.t Lwt_stream.t -> unit Lwt.tval open_file : ?buffer_size:int ->
?strict:bool ->
?encoding:Encoding.t ->
?flags:Unix.open_flag list ->
?perm:Unix.file_perm ->
mode:'a Lwt_io.mode -> Lwt_io.file_name -> 'a channel Lwt.tval with_file : ?buffer_size:int ->
?strict:bool ->
?encoding:Encoding.t ->
?flags:Unix.open_flag list ->
?perm:Unix.file_perm ->
mode:'a Lwt_io.mode ->
Lwt_io.file_name -> ('a channel -> 'b Lwt.t) -> 'b Lwt.tval lines_of_file : Lwt_io.file_name -> Text.t Lwt_stream.tval lines_to_file : Lwt_io.file_name -> Text.t Lwt_stream.t -> unit Lwt.tval chars_of_file : Lwt_io.file_name -> Text.t Lwt_stream.tval chars_to_file : Lwt_io.file_name -> Text.t Lwt_stream.t -> unit Lwt.tval fprint : output_channel -> Text.t -> unit Lwt.tval fprintl : output_channel -> Text.t -> unit Lwt.tval fprintf : output_channel ->
('a, unit, Text.t, unit Lwt.t) Pervasives.format4 -> 'aval fprintlf : output_channel ->
('a, unit, Text.t, unit Lwt.t) Pervasives.format4 -> 'aval print : Text.t -> unit Lwt.tval printl : Text.t -> unit Lwt.tval printf : ('a, unit, Text.t, unit Lwt.t) Pervasives.format4 -> 'aval printlf : ('a, unit, Text.t, unit Lwt.t) Pervasives.format4 -> 'aval eprint : Text.t -> unit Lwt.tval eprintl : Text.t -> unit Lwt.tval eprintf : ('a, unit, Text.t, unit Lwt.t) Pervasives.format4 -> 'aval eprintlf : ('a, unit, Text.t, unit Lwt.t) Pervasives.format4 -> 'aval hexdump_stream : output_channel -> char Lwt_stream.t -> unit Lwt.tval hexdump : output_channel -> string -> unit Lwt.t