ark::csv::CsvReader

Defined in header “ark/csv/csv_reader.hh”.


This class allows you to efficiently read CSV files from disk. It will return each row individually, reading through the file line-by-line.

This loosely conforms to RFC-4180, but it does take some liberties, particularly around whitespace (it will trim any whitespace that is not enclosed within parenthesis).

Methods

  • CsvReader(const std::filesystem::path & path, const CsvFormatConfig & format_config, const CsvReaderConfig & reader_config)
    Constructor. Reads the given CSV file, with the specified formatting options.

  • ~CsvReader()
    Destructor. Cleans up all open file handles/memory.

  • CsvReaderRow step()
    Return the next row in the CSV file. Will read data from disk as necessary.