mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
implement ls and cat commands for rescue mode
This commit is contained in:
parent
9c833486bf
commit
0f601752e4
3 changed files with 59 additions and 0 deletions
|
|
@ -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();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue