23         m_fileName(), m_file(), m_maxFileSize(0), m_openFile(false), m_currentFileSize(0)
 
   71                 status = (writeSize > 0);
 
  100         (void) strncpy(fileNameFinal,fileName,
 
  106         bool failedSuffix = 
false;
 
  116             if (suffix >= maxBackups) {
 
  122                                             "%s%" PRIu32,fileName,suffix);
 
  137             (void) strncpy(fileNameFinal,fileName,
 
PlatformIntType NATIVE_INT_TYPE
 
uint8_t U8
8-bit unsigned integer
 
PlatformSignedSizeType FwSignedSizeType
 
PlatformSizeType FwSizeType
 
void close() override
close the file, if not opened then do nothing
 
Os::FileInterface::Status open(const char *path, Mode mode)
open file with supplied path and mode
 
Status write(const U8 *buffer, FwSignedSizeType &size)
write data to this file from the supplied buffer bounded by size
 
@ WAIT
Do wait for read/write operation to finish.
 
@ NOT_OPENED
file hasn't been opened yet
 
@ OP_OK
Operation was successful.
 
@ OPEN_CREATE
Open file for writing and truncates file if it exists, ie same flags as creat()
 
static Status getFileSize(const char *path, FwSignedSizeType &size)
Get the size of the file (in bytes) at the specified path.
 
@ OP_OK
Operation was successful.
 
FwSizeType string_length(const CHAR *source, FwSizeType buffer_size)
get the length of the source string
 
bool set_log_file(const char *fileName, const U32 maxSize, const U32 maxBackups=10)
Set log file and max size.
 
bool write_to_log(const char *const buf, const U32 size)
Write the passed buf to the log if possible.