Files
IoTManager/include/FileSystem.h

36 lines
590 B
C
Raw Normal View History

2020-12-18 04:39:44 +03:00
#pragma once
#include "Consts.h"
#define FILE_READ "r"
#define FILE_WRITE "w"
#define FILE_APPEND "a"
2020-12-20 01:24:08 +03:00
#include <FS.h>
2020-12-30 13:48:29 +01:00
#ifdef ESP32
#include <SPIFFS.h>
extern FS* filesystem;
#define FileFS SPIFFS
#define FS_NAME "SPIFFS"
#endif
#ifdef ESP8266
2020-12-18 04:39:44 +03:00
#if USE_LITTLEFS
2020-12-30 13:48:29 +01:00
#include "LittleFS.h"
2020-12-18 04:39:44 +03:00
extern FS LittleFS;
using littlefs_impl::LittleFSConfig;
2020-12-18 23:52:35 +01:00
extern FS* filesystem;
2020-12-18 04:39:44 +03:00
#define FileFS LittleFS
#define FS_NAME "LittleFS"
#else
2020-12-18 23:52:35 +01:00
extern FS* filesystem;
2020-12-18 04:39:44 +03:00
#define FileFS SPIFFS
#define FS_NAME "SPIFFS"
#endif
2020-12-30 13:48:29 +01:00
#endif
2020-12-18 04:39:44 +03:00
2020-12-18 23:52:35 +01:00
extern void getFSInfo();
2020-12-30 13:48:29 +01:00
#ifdef ESP8266
extern bool getInfo(FSInfo& info);
#endif