From 9a36cfdee97917ca4cc21ae13eb0a77c9eef4a16 Mon Sep 17 00:00:00 2001 From: Costin Stroie Date: Mon, 14 Dec 2020 17:14:50 +0200 Subject: [PATCH] Add the missing 'rename' method wrapper in SD library. (#7766) --- libraries/SD/src/SD.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libraries/SD/src/SD.h b/libraries/SD/src/SD.h index d15d8f85b..0f76e654e 100644 --- a/libraries/SD/src/SD.h +++ b/libraries/SD/src/SD.h @@ -68,6 +68,14 @@ public: return (boolean)SDFS.exists(filepath.c_str()); } + boolean rename(const char* filepathfrom, const char* filepathto) { + return (boolean)SDFS.rename(filepathfrom, filepathto); + } + + boolean rename(const String &filepathfrom, const String &filepathto) { + return (boolean)rename(filepathfrom.c_str(), filepathto.c_str()); + } + boolean mkdir(const char *filepath) { return (boolean)SDFS.mkdir(filepath); }