1
0
mirror of https://github.com/arduino/Arduino.git synced 2025-01-17 06:52:18 +01:00

Merge pull request #3193 from Chris--A/SD_Strings

Added String handling to SD class
This commit is contained in:
Martino Facchin 2015-05-28 10:48:37 +02:00
commit 29e253495d

View File

@ -71,18 +71,23 @@ public:
// write, etc). Returns a File object for interacting with the file. // write, etc). Returns a File object for interacting with the file.
// Note that currently only one file can be open at a time. // Note that currently only one file can be open at a time.
File open(const char *filename, uint8_t mode = FILE_READ); File open(const char *filename, uint8_t mode = FILE_READ);
File open(const String &filename, uint8_t mode = FILE_READ) { return open( filename.c_str(), mode ); }
// Methods to determine if the requested file path exists. // Methods to determine if the requested file path exists.
boolean exists(char *filepath); boolean exists(char *filepath);
boolean exists(const String &filepath) { return exists(filepath.c_str()); }
// Create the requested directory heirarchy--if intermediate directories // Create the requested directory heirarchy--if intermediate directories
// do not exist they will be created. // do not exist they will be created.
boolean mkdir(char *filepath); boolean mkdir(char *filepath);
boolean mkdir(const String &filepath) { return mkdir(filepath.c_str()); }
// Delete the file. // Delete the file.
boolean remove(char *filepath); boolean remove(char *filepath);
boolean remove(const String &filepath) { return remove(filepath.c_str()); }
boolean rmdir(char *filepath); boolean rmdir(char *filepath);
boolean rmdir(const String &filepath) { return rmdir(filepath.c_str()); }
private: private: