Interface for writing file content.
More...
#include <IFileWriter.hpp>
|
| virtual | ~IFileWriter ()=default |
| virtual Result< void, FileError > | write (const std::filesystem::path &filePath, const std::string &content, bool append=false) const =0 |
| | Write string content to file.
|
| virtual Result< void, FileError > | writeBytes (const std::filesystem::path &filePath, const std::vector< uint8_t > &data, bool append=false) const =0 |
| | Write binary data to file.
|
| virtual Result< void, FileError > | writeLines (const std::filesystem::path &filePath, const std::vector< std::string > &lines, bool append=false) const =0 |
| | Write lines to file (each string becomes one line)
|
| virtual Result< void, FileError > | touch (const std::filesystem::path &filePath) const =0 |
| | Create empty file or update timestamp of existing file.
|
Interface for writing file content.
Provides abstraction for file writing operations with explicit error handling. All methods return Result<void, FileError> for safe error handling.
◆ ~IFileWriter()
| virtual dotnamecpp::utils::IFileWriter::~IFileWriter |
( |
| ) |
|
|
virtualdefault |
◆ touch()
| virtual Result< void, FileError > dotnamecpp::utils::IFileWriter::touch |
( |
const std::filesystem::path & | filePath | ) |
const |
|
nodiscardpure virtual |
◆ write()
| virtual Result< void, FileError > dotnamecpp::utils::IFileWriter::write |
( |
const std::filesystem::path & | filePath, |
|
|
const std::string & | content, |
|
|
bool | append = false ) const |
|
nodiscardpure virtual |
◆ writeBytes()
| virtual Result< void, FileError > dotnamecpp::utils::IFileWriter::writeBytes |
( |
const std::filesystem::path & | filePath, |
|
|
const std::vector< uint8_t > & | data, |
|
|
bool | append = false ) const |
|
nodiscardpure virtual |
◆ writeLines()
| virtual Result< void, FileError > dotnamecpp::utils::IFileWriter::writeLines |
( |
const std::filesystem::path & | filePath, |
|
|
const std::vector< std::string > & | lines, |
|
|
bool | append = false ) const |
|
nodiscardpure virtual |
The documentation for this class was generated from the following file: