File reader.
More...
#include <tkrzw_file_util.h>
◆ FileReader()
tkrzw::FileReader::FileReader |
( |
File * |
file | ) |
|
|
explicit |
Constructor.
- Parameters
-
file | A file object to read. Ownership is not taken. |
◆ ReadLine()
Status tkrzw::FileReader::ReadLine |
( |
std::string * |
str, |
|
|
size_t |
max_size = 0 |
|
) |
| |
Reads a line.
- Parameters
-
str | The pointer to a string object which stores the result. |
max_size | The maximum size of data to read. 0 means unlimited. |
- Returns
- The result status. NOT_FOUND_ERROR is returned at the end of file.