|
FabGL
ESP32 Display Controller and Graphics Library
|
|
static |
Gets total and free space on a filesystem.
| driveType | Type of support (SPI-Flash or SD Card). |
| drive | Drive number (Can be 0 when only one filesystem is mounted at the time). |
| total | Total space on the filesystem in bytes. |
| used | Used space on the filesystem in bytes. |
Example:
// print used and free space on SPIFFS (Flash)
int64_t total, used;
FileBrowser::getFSInfo(fabgl::DriveType::SPIFFS, 0, &total, &used);
Serial.printf("%lld KiB used, %lld KiB free", used / 1024, (total - used) / 1024);
// print used and free space on SD Card
int64_t total, used;
FileBrowser::getFSInfo(fabgl::DriveType::SDCard, 0, &total, &used);
Serial.printf("%lld KiB used, %lld KiB free", used / 1024, (total - used) / 1024);