SdFat
SdFat copied to clipboard
latest version no longer compatible with webserver.h
I switched to the latest version from 2.0.7. I am getting this error now: WebServer.h: 141:5: error: call to 'StreamFile<FsBaseFile, long long unsigned int>::name' declared with attribute error: use getName(name, size) _streamFileCore(file.size(), file.name(), contentType)
Before the latest version I returned an error message instead of the correct file name.
/** No longer implemented due to Long File Names.
*
* Use getName(char* name, size_t size).
* \return a pointer to replacement suggestion.
*/
const char* name() const {
return "use getName()";
}
This causes applications to fail with no error so I made this a hard error in the latest version of SdFat.
/** No longer implemented due to Long File Names.
*
* Use getName(char* name, size_t size).
*/
char* __attribute__((error("use getName(name, size)"))) name();
It would require almost 1 KB of RAM per file to implement this function for long utf8 file names and SdFat would no longer run on Uno.