## Summary * Standardize File handling with FsHelpers * Better central place to manage to logic of if files exist/open for reading/writing
15 lines
695 B
C++
15 lines
695 B
C++
#pragma once
|
|
#include <FS.h>
|
|
|
|
class FsHelpers {
|
|
public:
|
|
static bool openFileForRead(const char* moduleName, const char* path, File& file);
|
|
static bool openFileForRead(const char* moduleName, const std::string& path, File& file);
|
|
static bool openFileForRead(const char* moduleName, const String& path, File& file);
|
|
static bool openFileForWrite(const char* moduleName, const char* path, File& file);
|
|
static bool openFileForWrite(const char* moduleName, const std::string& path, File& file);
|
|
static bool openFileForWrite(const char* moduleName, const String& path, File& file);
|
|
static bool removeDir(const char* path);
|
|
static std::string normalisePath(const std::string& path);
|
|
};
|