bool flush() override
Flush buffered writes to disk.
FileWriteOptions m_options
bool write_string(std::string_view str) override
Write a string.
void set_max_file_size(size_t max_bytes)
Set maximum file size before rotation.
bool open(const std::string &filepath, FileWriteOptions options) override
Open a file for writing.
~TextFileWriter() override
bool can_write(const std::string &filepath) const override
Check if this writer can handle the given file path.
std::string get_last_error() const override
Get last error message.
bool write_line(std::string_view line) override
Write a line (appends newline)
void close() override
Close the currently open file.
size_t get_write_position() const override
Get current write position (bytes written)
bool write_bytes(const void *data, size_t size) override
Write raw bytes.
bool is_open() const override
Check if a file is currently open for writing.
bool should_rotate() const
size_t get_file_size() const
Get current file size.
Simple text file writer for logs and text data.