Skip to content

Commit faae575

Browse files
committed
Providing overwritten methods for create/open/remove/rename which provide a String parameter instead of char *
1 parent bccaad9 commit faae575

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/Arduino_SPIFFS.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,13 @@ class Arduino_SPIFFS
7878
inline int remove (const char *path) { return SPIFFS_remove(&_fs, path); }
7979
inline int rename (const char *old, const char *newPath) { return SPIFFS_rename(&_fs, old, newPath); }
8080

81+
inline int create (String const & path) { return create(path.c_str()); }
82+
inline File open (String const & path, uint16_t const flags) { return open(path.c_str(), flags); }
83+
inline int remove (String const & path) { return remove(path.c_str()); }
84+
inline int rename (String const & old, String const & newPath) { return rename(old.c_str(), newPath.c_str()); }
85+
8186
Directory opendir (const char *name);
87+
inline Directory opendir (String const & name) { return opendir(name.c_str()); }
8288

8389

8490
private:

0 commit comments

Comments
 (0)