Skip to content

Instantly share code, notes, and snippets.

@Tech500
Last active July 10, 2022 07:41
Show Gist options
  • Save Tech500/313b5dd95492a69d94d3b38058efadcd to your computer and use it in GitHub Desktop.
Save Tech500/313b5dd95492a69d94d3b38058efadcd to your computer and use it in GitHub Desktop.
String str;
if (!LittleFS.begin())
{
Serial.println("LittleFS failed to mount !");
}
Dir dir = LittleFS.openDir("/");
while (dir.next())
{
String file_name = dir.fileName();
if (file_name.startsWith("LOG"))
{
str += "<a href=\"";
str += dir.fileName();
str += "\">";
str += dir.fileName();
str += "</a>";
str += " ";
str += dir.fileSize();
str += "<br>\r\n";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment