esp8266ndn
NDN Arduino library for ESP8266 and more
Loading...
Searching...
No Matches
fs.hpp
Go to the documentation of this file.
1#ifndef ESP8266NDN_PORT_FS_HPP
2#define ESP8266NDN_PORT_FS_HPP
3
4#include <cstdint>
5#include <cstdlib>
6
7namespace esp8266ndn {
8namespace ndnph_port {
9
11class FileStore {
12public:
13 bool open(const char* path);
14
15 int read(const char* filename, uint8_t* buffer, size_t count);
16
17 bool write(const char* filename, const uint8_t* buffer, size_t count);
18
19 bool unlink(const char* filename);
20
21private:
22 bool joinPath(const char* filename);
23
24private:
25 static constexpr size_t maxNameLen = 31;
26 char m_path[maxNameLen + maxNameLen + 1];
27 size_t m_pathLen = 0;
28};
29
30} // namespace ndnph_port
31} // namespace esp8266ndn
32
33namespace ndnph {
34namespace port {
36} // namespace port
37} // namespace ndnph
38
39#endif // ESP8266NDN_PORT_FS_HPP
File storage on microcontroller filesystem.
Definition fs.hpp:11
int read(const char *filename, uint8_t *buffer, size_t count)
bool unlink(const char *filename)
bool open(const char *path)
bool write(const char *filename, const uint8_t *buffer, size_t count)
Definition autoconfig.hpp:24
Definition fs.hpp:33