From 46d2b1f6a466c2493b89325944a7136826c7bab2 Mon Sep 17 00:00:00 2001 From: Fede85 Date: Fri, 21 Jun 2013 19:48:56 +0200 Subject: renamed SD to FileSystem in FileIO library --- libraries/Bridge/FileIO.cpp | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'libraries/Bridge/FileIO.cpp') diff --git a/libraries/Bridge/FileIO.cpp b/libraries/Bridge/FileIO.cpp index c49c2b4..0fab55f 100644 --- a/libraries/Bridge/FileIO.cpp +++ b/libraries/Bridge/FileIO.cpp @@ -159,21 +159,15 @@ const char *File::name() { -boolean SDClass::begin() { - Process chksd; - int res = chksd.runShellCommand(F("cat /sys/bus/scsi/drivers/sd/*/block/sda/size")); - if (res == 0) { - if (chksd.peek() != '0') - return true; - } - return false; +boolean FileSystemClass::begin() { + return true; } -File SDClass::open(const char *filename, uint8_t mode) { +File FileSystemClass::open(const char *filename, uint8_t mode) { return File(filename, mode); } -boolean SDClass::exists(const char *filepath) { +boolean FileSystemClass::exists(const char *filepath) { Process ls; ls.begin("ls"); ls.addParameter(filepath); @@ -181,7 +175,7 @@ boolean SDClass::exists(const char *filepath) { return (res == 0); } -boolean SDClass::mkdir(const char *filepath) { +boolean FileSystemClass::mkdir(const char *filepath) { Process mk; mk.begin("mkdir"); mk.addParameter("-p"); @@ -190,7 +184,7 @@ boolean SDClass::mkdir(const char *filepath) { return (res == 0); } -boolean SDClass::remove(const char *filepath) { +boolean FileSystemClass::remove(const char *filepath) { Process rm; rm.begin("rm"); rm.addParameter(filepath); @@ -198,7 +192,7 @@ boolean SDClass::remove(const char *filepath) { return (res == 0); } -boolean SDClass::rmdir(const char *filepath) { +boolean FileSystemClass::rmdir(const char *filepath) { Process rm; rm.begin("rmdir"); rm.addParameter(filepath); @@ -206,4 +200,4 @@ boolean SDClass::rmdir(const char *filepath) { return (res == 0); } -SDClass SD; +FileSystemClass FileSystem; -- cgit v1.2.3-18-g5258