23 m_fileName(), m_file(), m_maxFileSize(0), m_openFile(false), m_currentFileSize(0)
71 status = (stat ==
Os::File::OP_OK) && (static_cast<FwSizeType>(writeSize) == size);
101 bool failedSuffix =
false;
105 if (suffix >= maxBackups) {
110 formatStatus = searchFilename.
format(
"%s%" PRIu32, fileName, suffix);
119 searchFilename = fileName;
bool write_to_log(const char *const buf, const FwSizeType size)
Write the passed buf to the log if possible.
PlatformSizeType FwSizeType
Os::FileInterface::Status open(const char *path, Mode mode)
open file with supplied path and mode
const char * toChar() const
Do wait for read/write operation to finish.
void close() override
close the file, if not opened then do nothing
Status write(const U8 *buffer, FwSizeType &size)
write data to this file from the supplied buffer bounded by size
bool set_log_file(const char *fileName, const FwSizeType maxSize, const FwSizeType maxBackups=10)
Set log file and max size.
FormatStatus format(const CHAR *formatString,...)
write formatted string to buffer
static Status getFileSize(const char *path, FwSizeType &size)
Get the size of the file (in bytes) at the specified path.
file hasn't been opened yet
Operation was successful.
RateGroupDivider component implementation.
FwSizeType m_currentFileSize
Operation was successful.
Fw::FileNameString m_fileName
FormatStatus
status of string format calls
Open file for writing and truncates file if it exists, ie same flags as creat()