Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions docs/api.md
Original file line number Diff line number Diff line change
Expand Up @@ -833,6 +833,13 @@ void setup() {
SD.begin(10);
root = SD.open("/");
printDirectory(root, 0);
Serial.println();

Serial.println("PRINT AGAIN");
Serial.println("-----------");
root.rewindDirectory(); // Return to the first file in the directory
printDirectory(root, 0);

Serial.println("Done!");
}

Expand All @@ -845,8 +852,6 @@ void printDirectory(File dir, int numTabs) {
File entry = dir.openNextFile();
if (!entry) {
// No more files
// Return to the first file in the directory
dir.rewindDirectory();
break;
}

Expand Down