All Classes Namespaces Functions Variables Groups Pages
CsvUtil::CsvFileWriter Class Reference

the CsvFileWriter class for easy and safe CSV file creation More...

Inheritance diagram for CsvUtil::CsvFileWriter:
[legend]

## Public Member Functions

| constructor (string path, *hash opts)
| creates the CsvFileWriter with the path of the file to read with an options More...
private | writeRawLine (list values)
| real write implementation. Without any checking.

## Additional Inherited Members

Private Member Functions inherited from CsvUtil::AbstractCsvWriter
| constructor (string errname, *hash opts)
| creates the AbstractCsvWriter More...
private string | dateFormat (int ix)
| format date to string by options. Priority: 1) column definition 2) standard format
private string | prepareRawLine (list values)
| Prepare a string (line with EOF) with formatting and escaping. More...
| write (AbstractIterator iterator)
| stream iterator into the file. More...
| writeLine (list values)
| write a line with list of values. Data are checked against column rules. More...
| writeLine (hash values)
| write a line with headers-values hash More...

## Detailed Description

the CsvFileWriter class for easy and safe CSV file creation

## Member Function Documentation

CsvUtil::CsvFileWriter::constructor | ( | string | path,
|  | *hash | opts
| ) |  |

creates the CsvFileWriter with the path of the file to read with an options

Parameters

  path | a file name (with path optionally) to write
  opts | AbstractCsvWriter Constructor Option Hash Overview

The file is created with O_CREAT, O_TRUNC, O_WRONLY and 0644 access.

Exceptions

  CSVFILEITER-ERROR | in the case of incorrect options