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:
committed by
GitHub
parent
69311c8fe1
commit
44bda41cf6
@ -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;
|
||||
|
Reference in New Issue
Block a user