5656#define MAX_COMPONENT_LEN 12 // What is max length?
5757#define PATH_COMPONENT_BUFFER_LEN MAX_COMPONENT_LEN+1
5858
59- bool getNextPathComponent (char *path, unsigned int *p_offset,
59+ bool getNextPathComponent (const char *path, unsigned int *p_offset,
6060 char *buffer) {
6161 /*
6262
@@ -115,7 +115,7 @@ bool getNextPathComponent(char *path, unsigned int *p_offset,
115115
116116
117117
118- boolean walkPath (char *filepath, SdFile& parentDir,
118+ boolean walkPath (const char *filepath, SdFile& parentDir,
119119 boolean (*callback)(SdFile& parentDir,
120120 char *filePathComponent,
121121 boolean isLastComponent,
@@ -513,7 +513,7 @@ File SDClass::open(char *filepath, uint8_t mode) {
513513// }
514514
515515
516- boolean SDClass::exists (char *filepath) {
516+ boolean SDClass::exists (const char *filepath) {
517517 /*
518518
519519 Returns true if the supplied file path exists.
@@ -534,7 +534,7 @@ boolean SDClass::exists(char *filepath) {
534534// }
535535
536536
537- boolean SDClass::mkdir (char *filepath) {
537+ boolean SDClass::mkdir (const char *filepath) {
538538 /*
539539
540540 Makes a single directory or a heirarchy of directories.
@@ -545,7 +545,7 @@ boolean SDClass::mkdir(char *filepath) {
545545 return walkPath (filepath, root, callback_makeDirPath);
546546}
547547
548- boolean SDClass::rmdir (char *filepath) {
548+ boolean SDClass::rmdir (const char *filepath) {
549549 /*
550550
551551 Remove a single directory or a heirarchy of directories.
@@ -556,7 +556,7 @@ boolean SDClass::rmdir(char *filepath) {
556556 return walkPath (filepath, root, callback_rmdir);
557557}
558558
559- boolean SDClass::remove (char *filepath) {
559+ boolean SDClass::remove (const char *filepath) {
560560 return walkPath (filepath, root, callback_remove);
561561}
562562
0 commit comments