1
0
mirror of https://github.com/MarlinFirmware/Marlin.git synced 2024-11-27 13:56:24 +00:00

simplified M20 with size

This commit is contained in:
Bob-the-Kuhn 2017-04-12 14:35:31 -05:00 committed by Scott Lahteine
parent b236562354
commit 1b12fea0fa

View File

@ -74,7 +74,7 @@ char *createFilename(char *buffer, const dir_t &p) { //buffer > 12characters
* Dive into a folder and recurse depth-first to perform a pre-set operation lsAction:
* LS_Count - Add +1 to nrFiles for every file within the parent
* LS_GetFilename - Get the filename of the file indexed by nrFiles
* LS_SerialPrint - Print the full path of each file to serial output
* LS_SerialPrint - Print the full path and size of each file to serial output
*/
void CardReader::lsDive(const char *prepend, SdFile parent, const char * const match/*=NULL*/) {
dir_t p;
@ -133,11 +133,15 @@ void CardReader::lsDive(const char *prepend, SdFile parent, const char * const m
case LS_Count:
nrFiles++;
break;
case LS_SerialPrint:
createFilename(filename, p);
SERIAL_PROTOCOL(prepend);
SERIAL_PROTOCOLLN(filename);
SERIAL_PROTOCOL(filename);
SERIAL_PROTOCOLCHAR(' ');
SERIAL_PROTOCOLLN(p.fileSize);
break;
case LS_GetFilename:
createFilename(filename, p);
if (match != NULL) {