roo_io
API Documentation for roo_io
Loading...
Searching...
No Matches
littlefs.h
Go to the documentation of this file.
1#pragma once
2
3#if (defined ESP_PLATFORM || defined ROO_TESTING) && \
4 __has_include("esp_littlefs.h")
5
7
8namespace roo_io {
9
10class LittlefsFs : 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 bool formatIfMountFailed() const;
20
21 MediaPresence checkMediaPresence() override;
22
23 protected:
24 MountImpl::MountResult mountImpl(std::function<void()> unmount_fn) override;
25
26 void unmountImpl() override;
27
28 Status format();
29
30 private:
32
33 LittlefsFs();
34
35 std::string mount_point_;
37
39 std::string partition_label_;
40 std::string mounted_partition_label_;
41};
42
43extern LittlefsFs LITTLEFS;
44
45} // namespace roo_io
46
47#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