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
6
#include "
roo_io/fs/filesystem.h
"
7
8
namespace
roo_io
{
9
10
class
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
;
19
void
setMaxOpenFiles
(
uint8_t
max_files
);
20
21
bool
formatIfMountFailed
()
const
;
22
void
setFormatIfMountFailed
(
bool
format_if_mount_failed
);
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_
;
39
uint8_t
max_open_files_
;
40
bool
format_if_mount_failed_
;
41
42
bool
has_partition_label_
;
43
std::string
partition_label_
;
44
std::string
mounted_partition_label_
;
45
};
46
47
extern
SpiffsFs
SPIFFS
;
48
49
}
// namespace roo_io
50
51
#endif
// ESP_PLATFORM
filesystem.h
roo_io
Definition
byte.h:6
roo_io::basic_string_view
roo::basic_string_view< CharT, Traits > basic_string_view
Definition
string_view.h:8
roo_io::Status
Status
Definition
status.h:7
temp_repos
roo_io
src
roo_io
fs
esp32
spiffs.h
Generated by
1.9.8