Files
cardboy/Firmware/main/include/fs_helper.hpp
2025-10-08 22:19:21 +02:00

27 lines
588 B
C++

#pragma once
#include <esp_err.h>
#include <string_view>
class FsHelper {
public:
static FsHelper& get();
esp_err_t mount();
void unmount();
bool isMounted() const { return mounted; }
const char* basePath() const { return kBasePath; }
const char* partitionLabel() const { return kPartitionLabel; }
private:
FsHelper() = default;
static constexpr const char* kBasePath = "/lfs";
static constexpr const char* kPartitionLabel = "littlefs";
static constexpr const bool kFormatOnFailure = true;
bool mounted = false;
};