From 893e93b6d5ac7b9d422da71220b1b70bdfdee7c6 Mon Sep 17 00:00:00 2001 From: Costin STROIE Date: Mon, 14 Dec 2020 14:06:47 +0200 Subject: [PATCH] Add the missing 'rename' method wrapper in SD library. --- 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 d15d8f85b4..0f76e654e0 100644 --- a/libraries/SD/src/SD.h +++ b/libraries/SD/src/SD.h @@ -68,6 +68,14 @@ class SDClass { 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); }