mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-16 00:43:00 +03:00
FileSystem: interface changes and some additions
- rename mount to begin to be more in line with other libraries - add rename and remove methods - remove freestanding functions (mount,open,openDir) from public API until that part is ready - fix resource leak in SPIFFSDirImpl
This commit is contained in:
@ -50,6 +50,7 @@ enum AccessMode {
|
||||
|
||||
class DirImpl {
|
||||
public:
|
||||
virtual ~DirImpl() { }
|
||||
virtual FileImplPtr openFile(OpenMode openMode, AccessMode accessMode) = 0;
|
||||
virtual const char* fileName() = 0;
|
||||
virtual bool next() = 0;
|
||||
@ -57,9 +58,11 @@ public:
|
||||
|
||||
class FSImpl {
|
||||
public:
|
||||
virtual bool begin() = 0;
|
||||
virtual FileImplPtr open(const char* path, OpenMode openMode, AccessMode accessMode) = 0;
|
||||
virtual DirImplPtr openDir(const char* path) = 0;
|
||||
virtual bool mount() = 0;
|
||||
virtual bool rename(const char* pathFrom, const char* pathTo) = 0;
|
||||
virtual bool remove(const char* path) = 0;
|
||||
|
||||
};
|
||||
|
||||
|
Reference in New Issue
Block a user