mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2025-01-19 08:08:25 +00:00
parent
e2a7249907
commit
1a4e208c69
4 changed files with 5 additions and 5 deletions
|
@ -322,12 +322,12 @@ void SdBaseFile::getpos(filepos_t * const pos) {
|
|||
* \param[in] indent Amount of space before file name. Used for recursive
|
||||
* list to indicate subdirectory level.
|
||||
*/
|
||||
void SdBaseFile::ls(uint8_t flags, uint8_t indent) {
|
||||
void SdBaseFile::ls(const uint8_t flags/*=0*/, const uint8_t indent/*=0*/) {
|
||||
rewind();
|
||||
int8_t status;
|
||||
while ((status = lsPrintNext(flags, indent))) {
|
||||
if (status > 1 && (flags & LS_R)) {
|
||||
uint16_t index = curPosition() / 32 - 1;
|
||||
const uint16_t index = curPosition() / 32 - 1;
|
||||
SdBaseFile s;
|
||||
if (s.open(this, index, O_READ)) s.ls(flags, indent + 2);
|
||||
seekSet(32 * (index + 1));
|
||||
|
|
|
@ -283,7 +283,7 @@ class SdBaseFile {
|
|||
bool isRoot() const { return type_ == FAT_FILE_TYPE_ROOT_FIXED || type_ == FAT_FILE_TYPE_ROOT32; }
|
||||
|
||||
bool getDosName(char * const name);
|
||||
void ls(uint8_t flags=0, uint8_t indent=0);
|
||||
void ls(const uint8_t flags=0, const uint8_t indent=0);
|
||||
|
||||
bool mkdir(SdBaseFile *parent, const char *path, const bool pFlag=true);
|
||||
bool open(SdBaseFile * const dirFile, uint16_t index, const uint8_t oflag);
|
||||
|
|
|
@ -353,7 +353,7 @@ void CardReader::printListing(MediaFile parent, const char * const prepend, cons
|
|||
//
|
||||
// List all files on the SD card
|
||||
//
|
||||
void CardReader::ls(const uint8_t lsflags) {
|
||||
void CardReader::ls(const uint8_t lsflags/*=0*/) {
|
||||
if (flag.mounted) {
|
||||
root.rewind();
|
||||
printListing(root, nullptr, lsflags);
|
||||
|
|
|
@ -209,7 +209,7 @@ public:
|
|||
}
|
||||
#endif
|
||||
|
||||
static void ls(const uint8_t lsflags);
|
||||
static void ls(const uint8_t lsflags=0);
|
||||
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
static bool jobRecoverFileExists();
|
||||
|
|
Loading…
Reference in a new issue