1
0
mirror of https://github.com/s00500/ESPUI.git synced 2024-12-22 14:20:51 +00:00

Added write function

Exposed unified littlefs type for use by our users.
This commit is contained in:
MartinMueller2003 2024-02-12 09:09:05 -05:00
parent 9efd0c27aa
commit 707c2aa3bf

View File

@ -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;