Get info for a file in the working directory by DOS name
| 1130 | // Get info for a file in the working directory by DOS name |
| 1131 | // |
| 1132 | void CardReader::selectFileByName(const char * const match) { |
| 1133 | #if ENABLED(SDSORT_CACHE_NAMES) |
| 1134 | for (int16_t nr = 0; nr < sort_count; nr++) |
| 1135 | if (strcasecmp(match, sortshort[nr]) == 0) { |
| 1136 | strcpy(filename, sortshort[nr]); |
| 1137 | strcpy(longFilename, sortnames[nr]); |
| 1138 | TERN_(HAS_FOLDER_SORTING, flag.filenameIsDir = IS_DIR(nr)); |
| 1139 | setBinFlag(extIsBIN(strrchr(filename, '.') + 1)); |
| 1140 | return; |
| 1141 | } |
| 1142 | #endif |
| 1143 | workDir.rewind(); |
| 1144 | selectByName(workDir, match); |
| 1145 | } |
| 1146 | |
| 1147 | /** |
| 1148 | * Dive to the given DOS 8.3 file path, with optional echo of the dive paths. |
no test coverage detected