The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Dependents:   hello SerialTestv11 SerialTestv12 Sierpinski ... more

mbed 2

This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.

Revision:
138:093f2bd7b9eb
Parent:
128:9bcdf88f62b0
--- a/drivers/DirHandle.h	Tue Feb 28 16:44:21 2017 +0000
+++ b/drivers/DirHandle.h	Tue Mar 14 16:20:51 2017 +0000
@@ -16,20 +16,11 @@
 #ifndef MBED_DIRHANDLE_H
 #define MBED_DIRHANDLE_H
 
-#if defined(__ARMCC_VERSION) || defined(__ICCARM__)
-#   define NAME_MAX 255
-typedef int mode_t;
-
-#else
-#   include <sys/syslimits.h>
-#endif
+#include <stdint.h>
+#include "platform/platform.h"
 
 #include "FileHandle.h"
 
-struct dirent {
-    char d_name[NAME_MAX+1];
-};
-
 namespace mbed {
 /** \addtogroup drivers */
 /** @{*/
@@ -50,8 +41,12 @@
  *  @Note Synchronization level: Set by subclass
  */
 class DirHandle {
+public:
+    MBED_DEPRECATED_SINCE("mbed-os-5.4",
+        "The mbed 2 filesystem classes have been superseeded by the FileSystem api, "
+        "Replaced by File")
+    DirHandle() {}
 
-public:
     /** Closes the directory.
      *
      *  @returns
@@ -103,22 +98,18 @@
     virtual void unlock() {
         // Stub
     }
+
+protected:
+    /** Internal-only constructor to work around deprecated notices when not used
+     *. due to nested deprecations and difficulty of compilers finding their way around
+     *  the class hierarchy
+     */
+    friend class FileSystemLike;
+    DirHandle(int) {}
 };
 
 } // namespace mbed
 
-typedef mbed::DirHandle DIR;
-
-extern "C" {
-    DIR *opendir(const char*);
-    struct dirent *readdir(DIR *);
-    int closedir(DIR*);
-    void rewinddir(DIR*);
-    long telldir(DIR*);
-    void seekdir(DIR*, long);
-    int mkdir(const char *name, mode_t n);
-};
-
 #endif /* MBED_DIRHANDLE_H */
 
 /** @}*/