-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Closed
Description
Basic Infos
Hardware
Hardware: ESP-12 or 12E, I don't know
Core Version: 2.1.0
Description
I would like to get long filename support on SD.
This SdFat fork got it.
https://github.com/tannewt/SdFat/
There are small use differences with SD. Most serious is you have to pass a buffer to get a file name.
I'm using this around it:
String getFilename(File f) {
char buff[256] = "";
f.getName(buff, 256);
return String(buff) + "";
}
+"" is because I don't know if String wraps the passed buffer or copies it.
I had to remove before write to overwrite too:
if (SD.exists(filename.c_str())) {
SD.remove(filename.c_str());
}
fsUploadFile = SD.open(filename.c_str(), FILE_WRITE);