uEspConfigLib
https://github.com/Naguissa/uEspConfigLib
uEspConfigLibFSInterface.h
Go to the documentation of this file.
1
21#pragma once
22
23#include <Arduino.h>
24
28#define uEspConfigLibFS_STATUS_NOINIT 0
32#define uEspConfigLibFS_STATUS_CLOSED 1
36#define uEspConfigLibFS_STATUS_OPEN_READ 2
40#define uEspConfigLibFS_STATUS_OPEN_WRITE 3
44#define uEspConfigLibFS_STATUS_ERROR 9
48#define uEspConfigLibFS_STATUS_FATAL 10
49
51 public:
52 // Regular usage functions
58 virtual bool openToRead() { return false; };
59
65 virtual bool openToWrite() { return false; };
66
73 virtual bool readLine(String *) { return false; };
74
81 virtual bool write(const char *) { return false; };
82
88 virtual bool closeFile() { return false; };
89
95 uint8_t status() { return _status; }
96
97 private:
98 uint8_t _status;
99 char * _path = 0;
100};
101
The deffinitive ESP32 and ESP8266 configuration Arduino library, uEspConfigLib - FileSystem interface...
Definition: uEspConfigLibFSInterface.h:50
virtual bool closeFile()
Closes current file.
Definition: uEspConfigLibFSInterface.h:88
uint8_t status()
Returns current status.
Definition: uEspConfigLibFSInterface.h:95
virtual bool openToRead()
Opens the file for read.
Definition: uEspConfigLibFSInterface.h:58
virtual bool write(const char *)
Writes content to current file.
Definition: uEspConfigLibFSInterface.h:81
virtual bool openToWrite()
Opens the file for write.
Definition: uEspConfigLibFSInterface.h:65
virtual bool readLine(String *)
Reads a whole line from current file.
Definition: uEspConfigLibFSInterface.h:73