56
56
#define MAX_COMPONENT_LEN 12 // What is max length?
57
57
#define PATH_COMPONENT_BUFFER_LEN MAX_COMPONENT_LEN+1
58
58
59
- bool getNextPathComponent (char *path, unsigned int *p_offset,
59
+ bool getNextPathComponent (const char *path, unsigned int *p_offset,
60
60
char *buffer) {
61
61
/*
62
62
@@ -115,7 +115,7 @@ bool getNextPathComponent(char *path, unsigned int *p_offset,
115
115
116
116
117
117
118
- boolean walkPath (char *filepath, SdFile& parentDir,
118
+ boolean walkPath (const char *filepath, SdFile& parentDir,
119
119
boolean (*callback)(SdFile& parentDir,
120
120
char *filePathComponent,
121
121
boolean isLastComponent,
@@ -513,7 +513,7 @@ File SDClass::open(char *filepath, uint8_t mode) {
513
513
// }
514
514
515
515
516
- boolean SDClass::exists (char *filepath) {
516
+ boolean SDClass::exists (const char *filepath) {
517
517
/*
518
518
519
519
Returns true if the supplied file path exists.
@@ -534,7 +534,7 @@ boolean SDClass::exists(char *filepath) {
534
534
// }
535
535
536
536
537
- boolean SDClass::mkdir (char *filepath) {
537
+ boolean SDClass::mkdir (const char *filepath) {
538
538
/*
539
539
540
540
Makes a single directory or a heirarchy of directories.
@@ -545,7 +545,7 @@ boolean SDClass::mkdir(char *filepath) {
545
545
return walkPath (filepath, root, callback_makeDirPath);
546
546
}
547
547
548
- boolean SDClass::rmdir (char *filepath) {
548
+ boolean SDClass::rmdir (const char *filepath) {
549
549
/*
550
550
551
551
Remove a single directory or a heirarchy of directories.
@@ -556,7 +556,7 @@ boolean SDClass::rmdir(char *filepath) {
556
556
return walkPath (filepath, root, callback_rmdir);
557
557
}
558
558
559
- boolean SDClass::remove (char *filepath) {
559
+ boolean SDClass::remove (const char *filepath) {
560
560
return walkPath (filepath, root, callback_remove);
561
561
}
562
562
0 commit comments