Module OLinq.IO

module IO: sig .. end

val read_chan : Pervasives.in_channel ->
(string, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
Read the content of the whole channel in (blocking), returning the corresponding string. The channel will be read at most once during execution, and its content cached; however the channel might never get read because evaluation is lazy.
val read_file : string -> (string, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
Read a whole file (given by name) and return its content as a string
val lines : (string, [< `Any | `AtMostOne | `One ]) OLinq.t -> (string, [ `Any ]) OLinq.t
Convert a string into a collection of lines
val lines_l : (string, [< `Any | `AtMostOne | `One ] as 'a) OLinq.t ->
(string list, 'a) OLinq.t
Convert each string into a list of lines
val concat : string ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(string, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
concat sep q joins all the strings in q together, similar to String.concat sep (run_list q) basically.
val unlines : (string, [< `Any | `AtMostOne | `One ]) OLinq.t ->
(string, [< `Any | `AtMostOne | `One > `One ]) OLinq.t
Join lines together
val out : Pervasives.out_channel ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit
val out_lines : Pervasives.out_channel ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit
Evaluate the query and print it line by line on the output

Run methods

val to_file : string ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit OLinq.or_error
val to_file_exn : string -> (string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit
val to_file_lines : string ->
(string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit OLinq.or_error
val to_file_lines_exn : string -> (string, [< `Any | `AtMostOne | `One ]) OLinq.t -> unit