File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -2695,13 +2695,12 @@ void handleFileList() {
2695
2695
}
2696
2696
jsonfile+=" ]," ;
2697
2697
jsonfile+=" \" status\" :\" " + status + " \" ," ;
2698
- uint32_t total;
2699
- uint32_t used;
2700
- SPIFFS.info (&total,&used);
2701
- jsonfile+=" \" total\" :\" " + formatBytes (total) + " \" ," ;
2702
- jsonfile+=" \" used\" :\" " + formatBytes (used) + " \" ," ;
2698
+ FSInfo info;
2699
+ SPIFFS.info (info);
2700
+ jsonfile+=" \" total\" :\" " + formatBytes (info.totalBytes ) + " \" ," ;
2701
+ jsonfile+=" \" used\" :\" " + formatBytes (info.usedBytes ) + " \" ," ;
2703
2702
jsonfile+=" \" occupation\" :\" " ;
2704
- jsonfile+= intTostr (100 *used/total );
2703
+ jsonfile+= intTostr (100 *info. usedBytes /info. totalBytes );
2705
2704
jsonfile+=" \" " ;
2706
2705
jsonfile+=" }" ;
2707
2706
path = " " ;
You can’t perform that action at this time.
0 commit comments