roo_io
API Documentation for roo_io
Loading...
Searching...
No Matches
spiffs.h
Go to the documentation of this file.
1#pragma once
2
3#if (defined ESP_PLATFORM || defined ROO_TESTING) && \
4 __has_include("esp_spiffs.h")
5
7
8namespace roo_io {
9
10class SpiffsFs : public Filesystem {
11 public:
12 const char* mountPoint() const;
13 void setMountPoint(const char* mount_point);
14
15 const char* partitionLabel() const;
16 void setPartitionLabel(const char* partition_label);
17
18 uint8_t maxOpenFiles() const;
20
21 bool formatIfMountFailed() const;
23
24 MediaPresence checkMediaPresence() override;
25
26 protected:
27 MountImpl::MountResult mountImpl(std::function<void()> unmount_fn) override;
28
29 void unmountImpl() override;
30
31 Status format();
32
33 private:
34 friend SpiffsFs CreateSpiffsFs();
35
36 SpiffsFs();
37
38 std::string mount_point_;
41
43 std::string partition_label_;
44 std::string mounted_partition_label_;
45};
46
47extern SpiffsFs SPIFFS;
48
49} // namespace roo_io
50
51#endif // ESP_PLATFORM
Definition byte.h:6
roo::basic_string_view< CharT, Traits > basic_string_view
Definition string_view.h:8
Status
Definition status.h:7