Initial commit

This commit is contained in:
2026-03-31 13:17:21 +02:00
commit 7eeecff042
6821 changed files with 3514215 additions and 0 deletions

View File

@@ -0,0 +1,26 @@
#ifndef FileHandler_h
#define FileHandler_h
#include <Arduino.h> // Inclure Arduino.h pour utiliser String
#include <FS.h> // Inclure la bibliothèque FS (ou la bibliothèque appropriée)
struct FileInfo {
String name;
size_t size;
};
class FileHandler {
public:
FileHandler();
FileInfo* listDir(fs::FS &fs, const char *dirname, uint8_t levels, int &fileCount);
void freeFileInfo(FileInfo* fileInfo);
bool createDir(fs::FS &fs, const char *path);
bool removeDir(fs::FS &fs, const char *path);
bool readFile(fs::FS &fs, const char *path);
bool writeFile(fs::FS &fs, const char *path, const char *message);
bool appendFile(fs::FS &fs, const char *path, const char *message);
bool renameFile(fs::FS &fs, const char *path1, const char *path2);
bool deleteFile(fs::FS &fs, const char *path);
};
#endif