SD.open() new feature for creating all folders in path (#5721)

* SD.open() new feature for creating all folders in path

This PR adds to the SD.open() function option to create all folders to the file.

SD.open(const char* path, const char* mode, const bool create)

Default value of create is false.
When true folders are created.

From issue #5019

* Update vfs_api.cpp

memccpy -> memcpy

* File f = open() edit

added false for create
This commit is contained in:
P-R-O-C-H-Y
2021-10-01 16:16:59 +02:00
committed by GitHub
parent c5bb8334d7
commit f2a20e8a38
8 changed files with 58 additions and 20 deletions

View File

@ -35,7 +35,7 @@ protected:
friend class VFSFileImpl;
public:
FileImplPtr open(const char* path, const char* mode) override;
FileImplPtr open(const char* path, const char* mode, const bool create) override;
bool exists(const char* path) override;
bool rename(const char* pathFrom, const char* pathTo) override;
bool remove(const char* path) override;