A GZIP compressed CSV path reader class. More...
#include <GZCSVPathReader.h>
Public Member Functions | |
| STANDARD_TYPEDEF (sella::file::GZCSVPathReader) | |
| GZCSVPathReader (const std::string &path, char delimiter=DefaultDelimiter, char seperator=DefaultSeperator) THROWS(IOException) | |
| void | read (std::vector< std::vector< std::string >> &data) THROWS(IOException) |
Static Public Attributes | |
| static const char * | FileSuffix = ".csv.gz" |
| The file suffix for matching files in the directory for reading. | |
| static const char | DefaultDelimiter = 0x1e |
| The default delimiter used between the fields of a record; the ASCII record seperator character. | |
| static const char | DefaultSeperator = 0x1d |
| The default seperator used between the records of a file; the ASCII group seperator character. | |
Static Protected Member Functions | |
| static int | filter (const struct dirent *file) NO_EXCEPTIONS |
A GZIP compressed CSV path reader class.
Definition at line 34 of file GZCSVPathReader.h.
| GZCSVPathReader::GZCSVPathReader | ( | const std::string & | path, |
| char | delimiter = DefaultDelimiter, |
||
| char | seperator = DefaultSeperator |
||
| ) |
The base constructor for a path reader.
| [in] | path | The full path to write files to. |
| [in] | delimiter | The field delimiter character for files. |
| [in] | seperator | The record seperator character for files. |
| IOException | if the path cannot be opened for reading. |
Definition at line 31 of file GZCSVPathReader.cpp.
|
staticprotected |
Filter files from the path based on their name.
| [in] | file | The direct structure for a single file. |
Definition at line 93 of file GZCSVPathReader.cpp.
References FileSuffix.
Referenced by read().
| void GZCSVPathReader::read | ( | std::vector< std::vector< std::string >> & | data | ) |
Read all files in the path defined for this instance.
| [in] | data | The vector to which all data will be written; if not empty this function will clear the vector before writing data. |
| IOException | if unabled to read the directory for any reason. |
Definition at line 59 of file GZCSVPathReader.cpp.
References sella::file::GZCSVFileReader::close(), filter(), and sella::file::GZCSVFileReader::read().
1.8.5