forked from espressif/arduino-esp32
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:
@ -186,18 +186,18 @@ void File::rewindDirectory(void)
|
||||
_p->rewindDirectory();
|
||||
}
|
||||
|
||||
File FS::open(const String& path, const char* mode)
|
||||
File FS::open(const String& path, const char* mode, const bool create)
|
||||
{
|
||||
return open(path.c_str(), mode);
|
||||
return open(path.c_str(), mode, create);
|
||||
}
|
||||
|
||||
File FS::open(const char* path, const char* mode)
|
||||
File FS::open(const char* path, const char* mode, const bool create)
|
||||
{
|
||||
if (!_impl) {
|
||||
return File();
|
||||
}
|
||||
|
||||
return File(_impl->open(path, mode));
|
||||
return File(_impl->open(path, mode, create));
|
||||
}
|
||||
|
||||
bool FS::exists(const char* path)
|
||||
|
Reference in New Issue
Block a user