Interface for reading file content.
More...
#include <IFileReader.hpp>
|
| virtual | ~IFileReader ()=default |
| virtual Result< std::string, FileError > | read (const std::filesystem::path &filePath) const =0 |
| | Read the entire content of a file as a string.
|
| virtual Result< std::vector< uint8_t >, FileError > | readBytes (const std::filesystem::path &filePath) const =0 |
| | Read the entire content of a file as a vector of bytes.
|
| virtual Result< std::vector< std::string >, FileError > | readLines (const std::filesystem::path &filePath) const =0 |
| | Read the content of a file as a vector of lines.
|
| virtual bool | exists (const std::filesystem::path &filePath) const =0 |
| | Check if a file exists.
|
| virtual Result< std::uintmax_t, FileError > | getSize (const std::filesystem::path &filePath) const =0 |
| | Get the Size object.
|
Interface for reading file content.
Provides abstraction for file reading operations with explicit error handling. All methods return Result<T, FileError> for safe error handling.
◆ ~IFileReader()
| virtual dotnamecpp::utils::IFileReader::~IFileReader |
( |
| ) |
|
|
virtualdefault |
◆ exists()
| virtual bool dotnamecpp::utils::IFileReader::exists |
( |
const std::filesystem::path & | filePath | ) |
const |
|
nodiscardpure virtual |
◆ getSize()
| virtual Result< std::uintmax_t, FileError > dotnamecpp::utils::IFileReader::getSize |
( |
const std::filesystem::path & | filePath | ) |
const |
|
nodiscardpure virtual |
◆ read()
| virtual Result< std::string, FileError > dotnamecpp::utils::IFileReader::read |
( |
const std::filesystem::path & | filePath | ) |
const |
|
nodiscardpure virtual |
◆ readBytes()
| virtual Result< std::vector< uint8_t >, FileError > dotnamecpp::utils::IFileReader::readBytes |
( |
const std::filesystem::path & | filePath | ) |
const |
|
nodiscardpure virtual |
◆ readLines()
| virtual Result< std::vector< std::string >, FileError > dotnamecpp::utils::IFileReader::readLines |
( |
const std::filesystem::path & | filePath | ) |
const |
|
nodiscardpure virtual |
The documentation for this class was generated from the following file: