mirror of
https://git.mirrors.martin98.com/https://github.com/luc-github/ESP3D.git
synced 2025-07-03 04:25:10 +08:00
Update to follow refactoring of info
now it use struct instead of integer
This commit is contained in:
parent
627052ceeb
commit
afa0eddcf0
@ -2695,13 +2695,12 @@ void handleFileList() {
|
||||
}
|
||||
jsonfile+="],";
|
||||
jsonfile+="\"status\":\"" + status + "\",";
|
||||
uint32_t total;
|
||||
uint32_t used;
|
||||
SPIFFS.info(&total,&used);
|
||||
jsonfile+="\"total\":\"" + formatBytes(total) + "\",";
|
||||
jsonfile+="\"used\":\"" + formatBytes(used) + "\",";
|
||||
FSInfo info;
|
||||
SPIFFS.info(info);
|
||||
jsonfile+="\"total\":\"" + formatBytes(info.totalBytes) + "\",";
|
||||
jsonfile+="\"used\":\"" + formatBytes(info.usedBytes) + "\",";
|
||||
jsonfile+="\"occupation\":\"" ;
|
||||
jsonfile+= intTostr(100*used/total);
|
||||
jsonfile+= intTostr(100*info.usedBytes/info.totalBytes);
|
||||
jsonfile+="\"";
|
||||
jsonfile+="}";
|
||||
path = "";
|
||||
|
Loading…
x
Reference in New Issue
Block a user