Get info for a file in the working directory by index
| 1113 | // Get info for a file in the working directory by index |
| 1114 | // |
| 1115 | void CardReader::selectFileByIndex(const int16_t nr) { |
| 1116 | #if ENABLED(SDSORT_CACHE_NAMES) |
| 1117 | if (nr < sort_count) { |
| 1118 | strcpy(filename, sortshort[nr]); |
| 1119 | strcpy(longFilename, sortnames[nr]); |
| 1120 | TERN_(HAS_FOLDER_SORTING, flag.filenameIsDir = IS_DIR(nr)); |
| 1121 | setBinFlag(extIsBIN(strrchr(filename, '.') + 1)); |
| 1122 | return; |
| 1123 | } |
| 1124 | #endif |
| 1125 | workDir.rewind(); |
| 1126 | selectByIndex(workDir, nr); |
| 1127 | } |
| 1128 | |
| 1129 | // |
| 1130 | // Get info for a file in the working directory by DOS name |
no test coverage detected