1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-13 02:22:55 +03:00

Add FS::info64 call for filesystems > 4GB (#6154)

Fixes #6082

Add an info64() call which returns used and total sizes as 64 bit
quantities.  A default wrapper that just copies the 32-bit values is
included for LittleFS/SPIFFS which can't hit those capacities.
This commit is contained in:
Earle F. Philhower, III
2019-05-30 10:51:55 -07:00
committed by GitHub
parent 69311c8fe1
commit 44bda41cf6
6 changed files with 74 additions and 5 deletions

View File

@ -126,6 +126,20 @@ public:
return true;
}
virtual bool info64(FSInfo64& info64) {
FSInfo i;
if (!info(i)) {
return false;
}
info64.blockSize = i.blockSize;
info64.pageSize = i.pageSize;
info64.maxOpenFiles = i.maxOpenFiles;
info64.maxPathLength = i.maxPathLength;
info64.totalBytes = i.totalBytes;
info64.usedBytes = i.usedBytes;
return true;
}
bool remove(const char* path) override {
if (!_mounted || !path || !path[0]) {
return false;