mirror of
				https://github.com/s00500/ESPUI.git
				synced 2025-11-04 04:13:23 +00:00 
			
		
		
		
	Added write function
Exposed unified littlefs type for use by our users.
This commit is contained in:
		
							
								
								
									
										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;
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user