Public Member Functions | List of all members
ime::utility::DiskFileReader Class Reference

Reads/writes data to/from the disk. More...

#include <DiskFileReader.h>

Public Member Functions

void readFileInto (const std::string &filename, std::stringstream &buffer)
 Read data from a file on the disk. More...
 
void writeToFile (const std::stringstream &buffer, const std::string &filename, WriteMode mode=WriteMode::Overwrite)
 Write data to a file on the disk. More...
 

Detailed Description

Reads/writes data to/from the disk.

Definition at line 46 of file DiskFileReader.h.

Member Function Documentation

◆ readFileInto()

void ime::utility::DiskFileReader::readFileInto ( const std::string &  filename,
std::stringstream &  buffer 
)

Read data from a file on the disk.

Parameters
filenameName of the file to read data from
bufferStores the contents of the read file
Exceptions
FileNotFoundExceptionIf the file cannot be found on the disk
Note
The file name must be preceded by the path to the file

◆ writeToFile()

void ime::utility::DiskFileReader::writeToFile ( const std::stringstream &  buffer,
const std::string &  filename,
WriteMode  mode = WriteMode::Overwrite 
)

Write data to a file on the disk.

Parameters
bufferContents to write to file
filenameName of the file to write data to
modeMode in which file is opened in
Exceptions
FileNotFoundExceptionIf the file cannot be found on the disk
Note
The file name must be preceded by the path to the file

The documentation for this class was generated from the following file: