Provides reading files.
More...
#include <ReadFileHandle.h>
Provides reading files.
Definition at line 11 of file ReadFileHandle.h.
◆ ReadFileHandle()
file_manager::ReadFileHandle::ReadFileHandle |
( |
const std::filesystem::path & | filePath, |
|
|
std::ios_base::openmode | mode = std::ios_base::in ) |
|
protected |
◆ ~ReadFileHandle()
file_manager::ReadFileHandle::~ReadFileHandle |
( |
| ) |
|
|
virtual |
◆ getStream()
istream & file_manager::ReadFileHandle::getStream |
( |
| ) |
|
◆ readAllData()
const string & file_manager::ReadFileHandle::readAllData |
( |
| ) |
|
Read all file.
- Returns
- File's data
- Exceptions
-
FileDoesNotExistException | |
Definition at line 30 of file ReadFileHandle.cpp.
◆ readSome()
streamsize file_manager::ReadFileHandle::readSome |
( |
std::string & | outData, |
|
|
std::streamsize | count, |
|
|
bool | shrinkOutData = true, |
|
|
bool | resizeOutData = true ) |
Read some data from file.
- Parameters
-
outData | Data from file |
count | Count of characters to read |
shrinkOutData | If true outData will be shrinked |
resizeOutData | If true outData will be resized to count size. If false you must provide outData size before calling |
- Returns
- Number of characters read
Definition at line 49 of file ReadFileHandle.cpp.
◆ FileManager
The documentation for this class was generated from the following files: