implement ls and cat commands for rescue mode

This commit is contained in:
liamcottle 2025-06-07 15:23:55 +12:00
parent 9c833486bf
commit 0f601752e4
3 changed files with 59 additions and 0 deletions

View file

@ -42,6 +42,16 @@ void DataStore::begin() {
#include <LittleFS.h>
#endif
File DataStore::openRead(const char* filename) {
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
return _fs->open(filename, FILE_O_READ);
#elif defined(RP2040_PLATFORM)
return _fs->open(filename, "r");
#else
return _fs->open(filename, "r", true);
#endif
}
bool DataStore::formatFileSystem() {
#if defined(NRF52_PLATFORM) || defined(STM32_PLATFORM)
return _fs->format();