Files
IoTManager/include/utils/FileUtils.h
Dmitry Borisenko 0a1d606149 версия 420
2022-09-13 16:39:55 +02:00

26 lines
1.0 KiB
C

#pragma once
#include "Global.h"
#include "EspFileSystem.h"
extern void writeFileUint8tByFrames(const String& filename, uint8_t*& big_buf, size_t length, size_t headerLenth, size_t frameSize);
extern void writeFileUint8tByByte(const String& filename, uint8_t*& payload, size_t length, size_t headerLenth);
extern File seekFile(const String& filename, size_t position = 0);
extern const String writeFile(const String& filename, const String& str);
extern const String addFileLn(const String& filename, const String& str);
extern const String readFile(const String& filename, size_t max_size);
extern const String filepath(const String& filename);
extern bool cutFile(const String& src, const String& dst);
extern size_t countLines(const String filename);
void removeFile(const String& filename);
void cleanDirectory(String path);
void cleanLogs();
void saveDataDB(String id, String data);
String readDataDB(String id);
extern void onFlashWrite();
String FileList(String path);
extern void getFSInfo();
#ifdef ESP8266
extern bool getInfo(FSInfo& info);
#endif