-
-
Notifications
You must be signed in to change notification settings - Fork 117
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
File base class #114
Comments
I've recently been working on File base class for Teensy. Details here: https://forum.pjrc.com/threads/64136-File-abstraction-and-SdFat-integration Turns out the ESP8266 and ESP32 cores have implemented a File base class for quite some time. Looks like they ran into similar "C++ slicing" issues and solved them with a complicated set of classes which seem to build on top of a virtual filesystem layer inside their SDK. I'm trying to follow some of ESP32's conventions where there's nothing from Arduino... I also looked the the Portenta core today. The Portenta_SDCARD library has a TestSDCARD example which looks pretty much nothing like Arduino's API. :( |
Any news on File and File System? Also referenced here #16 |
Similar to Print, Stream, Client, Server... we probably need a File base class.
Currently File is defined in the SD library, and also in the Bridge library for Yun. Most programs in the Arduino ecosystem which use files are tied to the SD library. Because they include SD.h in their headers, the SD library is automatically brought into the project.
But the SD library isn't the only possible source for files. Flash chips, USB mass storage, network filesystems can also provide files. Without a base class, each library using files needs to be edited.
Use of alternate SD card libraries, like SdFat, is also very difficult without a base class because so many libraries which consume files are SD.h included by their code.
Hopefully the time has come to move File out of the SD library and into an abstract base class?
The text was updated successfully, but these errors were encountered: