mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
16 lines
347 B
C
16 lines
347 B
C
|
|
#pragma once
|
||
|
|
|
||
|
|
#include <FS.h>
|
||
|
|
#include <Identity.h>
|
||
|
|
|
||
|
|
class IdentityStore {
|
||
|
|
fs::FS* _fs;
|
||
|
|
const char* _dir;
|
||
|
|
public:
|
||
|
|
IdentityStore(fs::FS& fs, const char* dir): _fs(&fs), _dir(dir) { }
|
||
|
|
|
||
|
|
void begin() { _fs->mkdir(_dir); }
|
||
|
|
bool load(const char *name, mesh::LocalIdentity& id);
|
||
|
|
bool save(const char *name, const mesh::LocalIdentity& id);
|
||
|
|
};
|