1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

add fileSize() method to Dir object

This commit is contained in:
Martin Ayotte
2015-08-12 22:12:22 -04:00
parent 1cd99391c3
commit 568c48b065
4 changed files with 17 additions and 0 deletions

View File

@ -308,6 +308,13 @@ public:
return (const char*) _dirent.name;
}
size_t fileSize() override {
if (!_valid)
return 0;
return _dirent.size;
}
bool next() override {
spiffs_dirent* result = SPIFFS_readdir(&_dir, &_dirent);
_valid = (result != nullptr);