mbed library sources

Fork of mbed-src by mbed official

Revision:
20:4263a77256ae
Parent:
13:0645d8841f51
--- a/common/FilePath.cpp	Mon Aug 19 18:17:02 2013 +0300
+++ b/common/FilePath.cpp	Tue Sep 10 15:14:19 2013 +0300
@@ -36,9 +36,6 @@
         file_name++;
     }
 
-    FileBase::lookup(file_system, len);
-
-
     fb = FileBase::lookup(file_system, len);
 }
 
@@ -47,6 +44,8 @@
 }
 
 bool FilePath::isFileSystem(void) {
+    if (NULL == fb)
+        return false;
     return (fb->getPathType() == FileSystemPathType);
 }
 
@@ -58,6 +57,8 @@
 }
 
 bool FilePath::isFile(void) {
+    if (NULL == fb)
+        return false;
     return (fb->getPathType() == FilePathType);
 }
 
@@ -68,4 +69,8 @@
     return NULL;
 }
 
+bool FilePath::exists(void) {
+    return fb != NULL;
+}
+
 } // namespace mbed