include Delimited_intf.S
module Header : Delimited_intf.Header
module Row : Delimited_intf.Row
type ('a, 'b) reader
= ?strip:bool ‑> ?skip_lines:int ‑> ?on_parse_error:[ `Raise | `Handle of string Core.Queue.t ‑> exn ‑> [ `Continue | `Finish ] ] ‑> header:'a ‑> 'b
If strip is true (default is false) then spaces will be stripped from the beginning and end of fields.
If skip_lines
is given then that number of lines will be read and discarded from the
top of the file or Reader.t given.
If on_parse_error
is `Raise any lines that fail to parse will raise an exception.
If `Handle is given the offending line will be passed to the function given, which may
then indicate that processing should continue or finish.
module Csv : sig ... end
proper csv file parsing is different than general delimited file parsing and requires special handling code
module Positional : sig ... end
val of_reader : (Header.t, ?quote:char ‑> sep:char ‑> Async.Reader.t ‑> Row.t Async.Pipe.Reader.t) reader
of_reader ?quote ?strip ?skip_lines ~sep ~header r
returns a row pipe based on data
read from the provided reader. sep
is used as the separator between fields, and is
assumed to be escaped with \ unless quote
is given.
val create_reader : (Header.t, ?quote:char ‑> sep:char ‑> string ‑> Row.t Async.Pipe.Reader.t Async.Deferred.t) reader
create_reader ?strip ?skip_lines ~header filename
same as of_reader, but creates
the reader for you