Closed
Description
Basic Infos
SPIFFS File implementation of seek is non-standard for Arduino
Description
All implementations of "seek" for Arduino File objects only take one param and assume seek from the front of the file.
The SPIFFs only implements one "seek" that requires a second param that defines the SeekMode. This makes it difficult to write code/libraries that will work across SD file objects and SPIFFs file objects.
The solution is change the SeekMode to have a default value of SeekSet or add another seek that doesn't take the second parameter.
FS.h
bool seek(uint32_t pos, SeekMode mode = SeekSet);
or
bool seek(uint32_t pos)
{
seek(pos, SeekSet);
}
Metadata
Metadata
Assignees
Labels
No labels