18 #ifndef MBED_FILE_SYSTEM_STORE_H 19 #define MBED_FILE_SYSTEM_STORE_H 21 #include "kvstore/KVStore.h" 22 #include "filesystem/FileSystem.h" 88 virtual int set(
const char *key,
const void *buffer,
size_t size, uint32_t create_flags);
107 virtual int get(
const char *key,
void *buffer,
size_t buffer_size,
size_t *actual_size = NULL,
size_t offset = 0);
137 virtual int remove(
const char *key);
155 virtual int set_start(set_handle_t *handle,
const char *key,
size_t final_data_size, uint32_t create_flags);
172 virtual int set_add_data(set_handle_t handle,
const void *value_data,
size_t data_size);
197 virtual int iterator_open(iterator_t *it,
const char *prefix = NULL);
212 virtual int iterator_next(iterator_t it,
char *key,
size_t key_size);
225 #if !defined(DOXYGEN_ONLY) 231 uint16_t metadata_size;
243 int _build_full_path_key(
const char *key_src);
254 int _verify_key_file(
const char *key, key_metadata_t *key_metadata,
File *kv_file);
260 bool _is_initialized;
262 size_t _cfg_fs_path_size;
263 char *_full_path_key;
264 size_t _cur_inc_data_size;
265 set_handle_t _cur_inc_set_handle;
271 #endif //MBED_FILE_SYSTEM_STORE_H
virtual int get_info(const char *key, info_t *info)
Get information of a given key.
virtual int reset()
Reset FileSystemStore contents (clear all keys)
virtual int set_start(set_handle_t *handle, const char *key, size_t final_data_size, uint32_t create_flags)
Start an incremental FileSystemStore set sequence.
virtual int deinit()
Deinitialize FileSystemStore, release and free resources.
FileSystemStore for Secure Store.
virtual ~FileSystemStore()
Destroy FileSystemStore instance.
virtual int init()
Initialize FileSystemStore, checking validity of KVStore writing folder and if it doesn't exist...
virtual int iterator_next(iterator_t it, char *key, size_t key_size)
Get next key in iteration.
virtual int iterator_close(iterator_t it)
Close iteration.
virtual int set_finalize(set_handle_t handle)
Finalize an incremental FileSystemStore set sequence.
virtual int iterator_open(iterator_t *it, const char *prefix=NULL)
Start an iteration over FileSystemStore keys.
FileSystemStore(FileSystem *fs)
Create FileSystemStore - A Key Value API on top of FS.
virtual int set_add_data(set_handle_t handle, const void *value_data, size_t data_size)
Add data to incremental FileSystemStore set sequence.