diff --git a/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp b/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp index 4cfc6dbd2..278802e9b 100644 --- a/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp +++ b/lib/libesp32/Zip-readonly-FS/src/ZipReadFS.cpp @@ -59,7 +59,7 @@ time_t dos2unixtime(uint32_t dostime) /******************************************************************** ** Zip file parser -** +** ********************************************************************/ template class LList; @@ -119,7 +119,7 @@ protected: /******************************************************************** ** Neutral file overlay -** +** ********************************************************************/ class ZipReadFileImpl; @@ -175,13 +175,29 @@ public: return true; } + #if ESP_ARDUINO_VERSION > ESP_ARDUINO_VERSION_VAL(2, 0, 5) + bool seekDir(long position){ + if(!_f){ + return false; + } + return _f.seekDir(position); + } + String getNextFileName(void) + { + if (!_f) { + return ""; + } + return _f.getNextFileName(); + } + #endif + protected: File _f; }; /******************************************************************** ** Subfile implementation -** +** ** Takes a `File` object of the ZIP archive ** First byte in archive and len ********************************************************************/ @@ -285,6 +301,23 @@ public: return nullptr; // TODO } + #if ESP_ARDUINO_VERSION > ESP_ARDUINO_VERSION_VAL(2, 0, 5) + bool seekDir(long position){ + if(!_f){ + return false; + } + return _f.seekDir(position); + } + + String getNextFileName(void) + { + if (!_f) { + return ""; + } + return _f.getNextFileName(); + } + #endif + void rewindDirectory(void) { // ignore } @@ -390,7 +423,7 @@ bool ZipArchive::parse(void) { /******************************************************************** ** Encapsulation of FS and File to piggyback on Arduino -** +** ********************************************************************/ /* get the FS corresponding to the prefix, typically /sd/ for sdcard */ @@ -491,4 +524,4 @@ bool ZipReadFSImpl::exists(const char* path) { ZipReadFSImpl::~ZipReadFSImpl() {}; -#endif // ESP32 \ No newline at end of file +#endif // ESP32