@@ -117,12 +117,12 @@ namespace SDLib {
117
117
118
118
119
119
120
- boolean walkPath (const char *filepath, SdFile& parentDir,
121
- boolean (*callback)(SdFile& parentDir,
122
- const char *filePathComponent,
123
- boolean isLastComponent,
124
- void *object),
125
- void *object = NULL) {
120
+ bool walkPath (const char *filepath, SdFile& parentDir,
121
+ bool (*callback)(SdFile& parentDir,
122
+ const char *filePathComponent,
123
+ bool isLastComponent,
124
+ void *object),
125
+ void *object = NULL) {
126
126
/*
127
127
128
128
When given a file path (and parent directory--normally root),
@@ -170,9 +170,9 @@ namespace SDLib {
170
170
171
171
while (true ) {
172
172
173
- boolean moreComponents = getNextPathComponent (filepath, &offset, buffer);
173
+ bool moreComponents = getNextPathComponent (filepath, &offset, buffer);
174
174
175
- boolean shouldContinue = callback ((*p_parent), buffer, !moreComponents, object);
175
+ bool shouldContinue = callback ((*p_parent), buffer, !moreComponents, object);
176
176
177
177
if (!shouldContinue) {
178
178
// TODO: Don't repeat this code?
@@ -188,7 +188,7 @@ namespace SDLib {
188
188
break ;
189
189
}
190
190
191
- boolean exists = (*p_child).open (*p_parent, buffer, O_RDONLY);
191
+ bool exists = (*p_child).open (*p_parent, buffer, O_RDONLY);
192
192
193
193
// If it's one we've created then we
194
194
// don't need the parent handle anymore.
@@ -232,8 +232,8 @@ namespace SDLib {
232
232
233
233
*/
234
234
235
- boolean callback_pathExists (SdFile& parentDir, const char *filePathComponent,
236
- boolean /* isLastComponent */ , void * /* object */ ) {
235
+ bool callback_pathExists (SdFile& parentDir, const char *filePathComponent,
236
+ bool /* isLastComponent */ , void * /* object */ ) {
237
237
/*
238
238
239
239
Callback used to determine if a file/directory exists in parent
@@ -244,7 +244,7 @@ namespace SDLib {
244
244
*/
245
245
SdFile child;
246
246
247
- boolean exists = child.open (parentDir, filePathComponent, O_RDONLY);
247
+ bool exists = child.open (parentDir, filePathComponent, O_RDONLY);
248
248
249
249
if (exists) {
250
250
child.close ();
@@ -255,8 +255,8 @@ namespace SDLib {
255
255
256
256
257
257
258
- boolean callback_makeDirPath (SdFile& parentDir, const char *filePathComponent,
259
- boolean isLastComponent, void *object) {
258
+ bool callback_makeDirPath (SdFile& parentDir, const char *filePathComponent,
259
+ bool isLastComponent, void *object) {
260
260
/*
261
261
262
262
Callback used to create a directory in the parent directory if
@@ -265,7 +265,7 @@ namespace SDLib {
265
265
Returns true if a directory was created or it already existed.
266
266
267
267
*/
268
- boolean result = false ;
268
+ bool result = false ;
269
269
SdFile child;
270
270
271
271
result = callback_pathExists (parentDir, filePathComponent, isLastComponent, object);
@@ -279,8 +279,8 @@ namespace SDLib {
279
279
280
280
/*
281
281
282
- boolean callback_openPath(SdFile& parentDir, char *filePathComponent,
283
- boolean isLastComponent, void *object) {
282
+ bool callback_openPath(SdFile& parentDir, char *filePathComponent,
283
+ bool isLastComponent, void *object) {
284
284
285
285
Callback used to open a file specified by a filepath that may
286
286
specify one or more directories above it.
@@ -310,16 +310,16 @@ namespace SDLib {
310
310
311
311
312
312
313
- boolean callback_remove (SdFile& parentDir, const char *filePathComponent,
314
- boolean isLastComponent, void * /* object */ ) {
313
+ bool callback_remove (SdFile& parentDir, const char *filePathComponent,
314
+ bool isLastComponent, void * /* object */ ) {
315
315
if (isLastComponent) {
316
316
return SdFile::remove (parentDir, filePathComponent);
317
317
}
318
318
return true ;
319
319
}
320
320
321
- boolean callback_rmdir (SdFile& parentDir, const char *filePathComponent,
322
- boolean isLastComponent, void * /* object */ ) {
321
+ bool callback_rmdir (SdFile& parentDir, const char *filePathComponent,
322
+ bool isLastComponent, void * /* object */ ) {
323
323
if (isLastComponent) {
324
324
SdFile f;
325
325
if (!f.open (parentDir, filePathComponent, O_READ)) {
@@ -336,7 +336,7 @@ namespace SDLib {
336
336
337
337
338
338
339
- boolean SDClass::begin (uint8_t csPin) {
339
+ bool SDClass::begin (uint8_t csPin) {
340
340
if (root.isOpen ()) {
341
341
root.close ();
342
342
}
@@ -353,7 +353,7 @@ namespace SDLib {
353
353
root.openRoot (volume);
354
354
}
355
355
356
- boolean SDClass::begin (uint32_t clock, uint8_t csPin) {
356
+ bool SDClass::begin (uint32_t clock, uint8_t csPin) {
357
357
if (root.isOpen ()) {
358
358
root.close ();
359
359
}
@@ -523,7 +523,7 @@ namespace SDLib {
523
523
*/
524
524
525
525
526
- // boolean SDClass::close() {
526
+ // bool SDClass::close() {
527
527
// /*
528
528
//
529
529
// Closes the file opened by the `open` method.
@@ -533,7 +533,7 @@ namespace SDLib {
533
533
// }
534
534
535
535
536
- boolean SDClass::exists (const char *filepath) {
536
+ bool SDClass::exists (const char *filepath) {
537
537
/*
538
538
539
539
Returns true if the supplied file path exists.
@@ -543,7 +543,7 @@ namespace SDLib {
543
543
}
544
544
545
545
546
- // boolean SDClass::exists(char *filepath, SdFile& parentDir) {
546
+ // bool SDClass::exists(char *filepath, SdFile& parentDir) {
547
547
// /*
548
548
//
549
549
// Returns true if the supplied file path rooted at `parentDir`
@@ -554,7 +554,7 @@ namespace SDLib {
554
554
// }
555
555
556
556
557
- boolean SDClass::mkdir (const char *filepath) {
557
+ bool SDClass::mkdir (const char *filepath) {
558
558
/*
559
559
560
560
Makes a single directory or a hierarchy of directories.
@@ -565,7 +565,7 @@ namespace SDLib {
565
565
return walkPath (filepath, root, callback_makeDirPath);
566
566
}
567
567
568
- boolean SDClass::rmdir (const char *filepath) {
568
+ bool SDClass::rmdir (const char *filepath) {
569
569
/*
570
570
571
571
Remove a single directory or a hierarchy of directories.
@@ -576,7 +576,7 @@ namespace SDLib {
576
576
return walkPath (filepath, root, callback_rmdir);
577
577
}
578
578
579
- boolean SDClass::remove (const char *filepath) {
579
+ bool SDClass::remove (const char *filepath) {
580
580
return walkPath (filepath, root, callback_remove);
581
581
}
582
582
0 commit comments