Get LFN from SFN with SDFat
Posted: Sat May 15, 2021 12:10 pm
I am trying to optimize the memory usage of my ESP8266 arduino sketch by using 8.3 SFN folder names internally, but LFN when needed for user output. Unfortunately when opening a folder by using the SFN, getName also returns the SFN:
results in "BLUBBE~1" while
results in "blubberblub" (and getSFN would return "BLUBBE~1"). Is there any chance to open the folder using the SFN "BLUBBE~1", but get the LFN ("blubberblub") later on?
Code: Select all
sdfat::SdFile _currentFolder;
_currentFolder.open("BLUBBE~1");
char foldername[100];
_currentFolder.getName(foldername, sizeof(foldername));
results in "BLUBBE~1" while
Code: Select all
sdfat::SdFile _currentFolder;
_currentFolder.open("blubberblub");
char foldername[100];
_currentFolder.getName(foldername, sizeof(foldername));
results in "blubberblub" (and getSFN would return "BLUBBE~1"). Is there any chance to open the folder using the SFN "BLUBBE~1", but get the LFN ("blubberblub") later on?