mirror of
https://github.com/s00500/ESPUI.git
synced 2024-11-21 17:40:54 +00:00
Added write function
Exposed unified littlefs type for use by our users.
This commit is contained in:
parent
9efd0c27aa
commit
707c2aa3bf
11
src/ESPUI.h
11
src/ESPUI.h
@ -117,6 +117,7 @@ public:
|
||||
void prepareFileSystem(bool format = true); // Initially preps the filesystem and loads a lot of
|
||||
// stuff into LITTLEFS
|
||||
void list(); // Lists LITTLEFS directory
|
||||
void writeFile(const char* path, const char* data);
|
||||
|
||||
uint16_t addControl(ControlType type, const char* label);
|
||||
uint16_t addControl(ControlType type, const char* label, const String& value);
|
||||
@ -236,6 +237,16 @@ public:
|
||||
AsyncWebServer* WebServer() {return server;}
|
||||
AsyncWebSocket* WebSocket() {return ws;}
|
||||
|
||||
#if defined(ESP32)
|
||||
# if (ESP_IDF_VERSION_MAJOR == 4 && ESP_IDF_VERSION_MINOR >= 4) || ESP_IDF_VERSION_MAJOR > 4
|
||||
fs::LittleFSFS & EspuiLittleFS = LittleFS;
|
||||
#else
|
||||
fs::LITTLEFSFS & EspuiLittleFS = LITTLEFS;
|
||||
# endif
|
||||
#else
|
||||
fs::FS & EspuiLittleFS = LittleFS;
|
||||
#endif
|
||||
|
||||
protected:
|
||||
friend class ESPUIclient;
|
||||
friend class ESPUIcontrol;
|
||||
|
Loading…
Reference in New Issue
Block a user