mirror of
https://github.com/arendst/Tasmota.git
synced 2025-07-22 18:26:30 +00:00
changes FS for Arduino stage (#17413)
This commit is contained in:
parent
72c9bca4d3
commit
ebf87bdfc8
@ -59,7 +59,7 @@ time_t dos2unixtime(uint32_t dostime)
|
|||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Zip file parser
|
** Zip file parser
|
||||||
**
|
**
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
template <typename T> class LList;
|
template <typename T> class LList;
|
||||||
|
|
||||||
@ -119,7 +119,7 @@ protected:
|
|||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Neutral file overlay
|
** Neutral file overlay
|
||||||
**
|
**
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
class ZipReadFileImpl;
|
class ZipReadFileImpl;
|
||||||
@ -175,13 +175,29 @@ public:
|
|||||||
return true;
|
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:
|
protected:
|
||||||
File _f;
|
File _f;
|
||||||
};
|
};
|
||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Subfile implementation
|
** Subfile implementation
|
||||||
**
|
**
|
||||||
** Takes a `File` object of the ZIP archive
|
** Takes a `File` object of the ZIP archive
|
||||||
** First byte in archive and len
|
** First byte in archive and len
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
@ -285,6 +301,23 @@ public:
|
|||||||
return nullptr; // TODO
|
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) {
|
void rewindDirectory(void) {
|
||||||
// ignore
|
// ignore
|
||||||
}
|
}
|
||||||
@ -390,7 +423,7 @@ bool ZipArchive::parse(void) {
|
|||||||
|
|
||||||
/********************************************************************
|
/********************************************************************
|
||||||
** Encapsulation of FS and File to piggyback on Arduino
|
** Encapsulation of FS and File to piggyback on Arduino
|
||||||
**
|
**
|
||||||
********************************************************************/
|
********************************************************************/
|
||||||
|
|
||||||
/* get the FS corresponding to the prefix, typically /sd/ for sdcard */
|
/* get the FS corresponding to the prefix, typically /sd/ for sdcard */
|
||||||
@ -491,4 +524,4 @@ bool ZipReadFSImpl::exists(const char* path) {
|
|||||||
|
|
||||||
ZipReadFSImpl::~ZipReadFSImpl() {};
|
ZipReadFSImpl::~ZipReadFSImpl() {};
|
||||||
|
|
||||||
#endif // ESP32
|
#endif // ESP32
|
||||||
|
Loading…
x
Reference in New Issue
Block a user