Skip to content

Commit 9a36cfd

Browse files
authored
Add the missing 'rename' method wrapper in SD library. (#7766)
1 parent 1e016a4 commit 9a36cfd

File tree

1 file changed

+8
-0
lines changed
  • libraries/SD/src

1 file changed

+8
-0
lines changed

libraries/SD/src/SD.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,14 @@ class SDClass {
6868
return (boolean)SDFS.exists(filepath.c_str());
6969
}
7070

71+
boolean rename(const char* filepathfrom, const char* filepathto) {
72+
return (boolean)SDFS.rename(filepathfrom, filepathto);
73+
}
74+
75+
boolean rename(const String &filepathfrom, const String &filepathto) {
76+
return (boolean)rename(filepathfrom.c_str(), filepathto.c_str());
77+
}
78+
7179
boolean mkdir(const char *filepath) {
7280
return (boolean)SDFS.mkdir(filepath);
7381
}

0 commit comments

Comments
 (0)