Added file system info when generating the files list.
This commit is contained in:
		@@ -109,6 +109,14 @@ void WebServer::begin() {
 | 
				
			|||||||
      json += "\"message\":\"" + message + "\"";
 | 
					      json += "\"message\":\"" + message + "\"";
 | 
				
			||||||
    } else {
 | 
					    } else {
 | 
				
			||||||
      json += "\"result\":\"OK\",";
 | 
					      json += "\"result\":\"OK\",";
 | 
				
			||||||
 | 
					      json += "\"fsinfo\":{";
 | 
				
			||||||
 | 
					        json += "\"totalBytes\":" + String(fs_info.totalBytes) + ",";
 | 
				
			||||||
 | 
					        json += "\"usedBytes\":" + String(fs_info.usedBytes) + ",";
 | 
				
			||||||
 | 
					        json += "\"blockSize\":" + String(fs_info.blockSize) + ",";
 | 
				
			||||||
 | 
					        json += "\"pageSize\":" + String(fs_info.pageSize) + ",";
 | 
				
			||||||
 | 
					        json += "\"maxOpenFiles\":" + String(fs_info.maxOpenFiles) + ",";
 | 
				
			||||||
 | 
					        json += "\"maxPathLength\":" + String(fs_info.maxPathLength) + ",";
 | 
				
			||||||
 | 
					      json += "},";
 | 
				
			||||||
      json += "\"files\":\"[";
 | 
					      json += "\"files\":\"[";
 | 
				
			||||||
      Dir dir = SPIFFS.openDir("/");
 | 
					      Dir dir = SPIFFS.openDir("/");
 | 
				
			||||||
      boolean isFirstEntry = true;
 | 
					      boolean isFirstEntry = true;
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user