Struct 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.
variable Delete¶
Remove path ; true also when it was already absent.
Independent of any open file.
variable Exists¶
Queries path on the filesystem, independent of any open file.
variable IsOpen¶
variable Open¶
Open path for reading and writing, creating it empty if absent and preserving existing content otherwise (never truncates on open).
Return value:
falseopen failed; the instance stays closed.
variable Read¶
Read exactly count bytes at the current position intobuf .
Return value:
falsefewer thancountbytes were available (short read or error);bufcontent is then unspecified. Partial success is not distinguished from failure.
variable SeekTo¶
Position for the next Read/Write, absolute from the start.
Errors are silent.
variable Size¶
Current length in bytes; 0 on error.
variable Truncate¶
Discard all content, leaving the file open at length 0.
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).
Return value:
falsethe fullcountwas not written and committed.
The documentation for this class was generated from the following file Core/Interface/SolidSyslogFileDefinition.h