#include <CBORStorage.h>
|
| | CBORStorage (const String &path) |
| | Constructs a new CBORStorage object.
|
| |
| virtual | ~CBORStorage () |
| | Virtual destructor.
|
| |
| CBORObject & | object () |
| | Get access to the underlying CBORObject.
|
| |
| virtual bool | store () override |
| | Store the CBOR object to the filesystem.
|
| |
| virtual bool | restore () override |
| | Restore the CBOR object from the filesystem.
|
| |
| virtual bool | clean () override |
| | Clean the CBOR object and remove the storage file.
|
| |
| | Storage (const String &path) |
| | Constructs a Storage object for a specific file.
|
| |
| virtual | ~Storage () |
| | Destructor.
|
| |
|
| CBORObject | mCbor |
| | The CBOR object used for data serialization/deserialization.
|
| |
| Bytes | mData |
| | The byte array containing the data to be stored or the loaded data.
|
| |
| String | mPath |
| | The file path where data is stored.
|
| |
|
| static void | unmount () |
| | Explicitly unmounts the filesystem.
|
| |
| void | setPath (const String &path) |
| | Sets the file path, ensuring it starts with "/".
|
| |
◆ CBORStorage()
| uniot::CBORStorage::CBORStorage |
( |
const String & | path | ) |
|
|
inline |
Constructs a new CBORStorage object.
- Parameters
-
| path | The filesystem path where the CBOR data will be stored |
◆ ~CBORStorage()
| virtual uniot::CBORStorage::~CBORStorage |
( |
| ) |
|
|
inlinevirtual |
◆ clean()
| virtual bool uniot::CBORStorage::clean |
( |
| ) |
|
|
inlineoverridevirtual |
Clean the CBOR object and remove the storage file.
Resets the CBOR object to its initial state and removes the associated file.
- Return values
-
| true | Clean operation was successful |
| false | Clean operation failed (e.g., file system error) |
Reimplemented from uniot::Storage.
Reimplemented in uniot::WifiStorage.
◆ object()
Get access to the underlying CBORObject.
- Return values
-
| CBORObject& | The internal CBOR object |
◆ restore()
| virtual bool uniot::CBORStorage::restore |
( |
| ) |
|
|
inlineoverridevirtual |
◆ store()
| virtual bool uniot::CBORStorage::store |
( |
| ) |
|
|
inlineoverridevirtual |
◆ mCbor
The CBOR object used for data serialization/deserialization.
The documentation for this class was generated from the following file: