Skip to content

Struct SolidSyslogFile

ClassList > SolidSyslogFile

The File contract a porter implements (FatFs, FreeRTOS-Plus-FAT, a raw flash driver, ...). More...

  • #include <SolidSyslogFileDefinition.h>

Public Attributes

Type Name
void(* Close
No-op if already closed.
bool(* Delete
Remove path ; true also when it was already absent.
bool(* Exists
Queries path on the filesystem, independent of any open file.
bool(* IsOpen
bool(* Open
Open path for reading and writing, creating it empty if absent and preserving existing content otherwise (never truncates on open).
bool(* Read
Read exactly count bytes at the current position intobuf .
void(* SeekTo
Position for the next Read/Write, absolute from the start.
size_t(* Size
Current length in bytes; 0 on error.
void(* Truncate
Discard all content, leaving the file open at length 0.
bool(* Write
Write exactly count bytes at the current position and commit them to the media before returning (the BlockStore treats a true return as durable across power loss, so an implementation must flush).

Detailed Description

One instance holds at most one open file; Open on an already-open instance is not expected. Read/Write share a single position moved by SeekTo, so the consumer seeks before each transfer.

Public Attributes Documentation

variable Close

No-op if already closed.

void(* SolidSyslogFile::Close) (struct SolidSyslogFile *base);


variable Delete

Remove path ; true also when it was already absent.

bool(* SolidSyslogFile::Delete) (struct SolidSyslogFile *base, const char *path);

Independent of any open file.


variable Exists

Queries path on the filesystem, independent of any open file.

bool(* SolidSyslogFile::Exists) (struct SolidSyslogFile *base, const char *path);


variable IsOpen

bool(* SolidSyslogFile::IsOpen) (struct SolidSyslogFile *base);

variable Open

Open path for reading and writing, creating it empty if absent and preserving existing content otherwise (never truncates on open).

bool(* SolidSyslogFile::Open) (struct SolidSyslogFile *base, const char *path);

Return value:

  • false open failed; the instance stays closed.

variable Read

Read exactly count bytes at the current position intobuf .

bool(* SolidSyslogFile::Read) (struct SolidSyslogFile *base, void *buf, size_t count);

Return value:

  • false fewer than count bytes were available (short read or error); buf content is then unspecified. Partial success is not distinguished from failure.

variable SeekTo

Position for the next Read/Write, absolute from the start.

void(* SolidSyslogFile::SeekTo) (struct SolidSyslogFile *base, size_t offset);

Errors are silent.


variable Size

Current length in bytes; 0 on error.

size_t(* SolidSyslogFile::Size) (struct SolidSyslogFile *base);


variable Truncate

Discard all content, leaving the file open at length 0.

void(* SolidSyslogFile::Truncate) (struct SolidSyslogFile *base);


variable Write

Write exactly count bytes at the current position and commit them to the media before returning (the BlockStore treats a true return as durable across power loss, so an implementation must flush).

bool(* SolidSyslogFile::Write) (struct SolidSyslogFile *base, const void *buf, size_t count);

Return value:

  • false the full count was not written and committed.


The documentation for this class was generated from the following file Core/Interface/SolidSyslogFileDefinition.h