mirror of
https://github.com/IoTManagerProject/IoTManager.git
synced 2026-03-27 06:32:19 +03:00
first
This commit is contained in:
46
include/Utils/FileHelper.h
Normal file
46
include/Utils/FileHelper.h
Normal file
@@ -0,0 +1,46 @@
|
||||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
#include "FileSystem.h"
|
||||
|
||||
class FileHelper {
|
||||
public:
|
||||
FileHelper(const String filename);
|
||||
/*
|
||||
* Проверить существование
|
||||
*/
|
||||
void exists();
|
||||
/*
|
||||
* Удалить файл
|
||||
*/
|
||||
void remove();
|
||||
/*
|
||||
* Открыть файл установить позицию @position
|
||||
*/
|
||||
File seek(size_t position = 0);
|
||||
|
||||
/*
|
||||
* Чтение строки с содержащей @substr
|
||||
*/
|
||||
String readFileString(const String substr);
|
||||
|
||||
/*
|
||||
* Добовление строки @str в файл
|
||||
*/
|
||||
String appendStr(const String str);
|
||||
|
||||
/*
|
||||
* Запись строки
|
||||
*/
|
||||
String writeStr(const String);
|
||||
|
||||
/*
|
||||
* Чтение в строку
|
||||
*/
|
||||
String readStr(size_t);
|
||||
|
||||
/*
|
||||
* Размер в байтах
|
||||
*/
|
||||
size_t getSize();
|
||||
};
|
||||
Reference in New Issue
Block a user