what does this function do?
// Enumerate and possibly display the animated GIF filenames in GIFS directory
int enumerateGIFFiles(const char *directoryName, boolean displayFilenames) {
numberOfFiles = 0;
File directory = SD.open(directoryName);
if (!directory) {
return -1;
}
File file = directory.openNextFile();
while (file) {
if (isAnimationFile(file.name())) {
numberOfFiles++;
if (displayFilenames) {
Serial.println(file.name());
}
}
file.close();
file = directory.openNextFile();
}
file.close();
directory.close();
return numberOfFiles;
what does this function do? // Enumerate and possibly display the animated GIF filenames in GIFS directory int enumerateGIFFiles(const char *directoryName, boolean displayFilenames) {