Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of UDNS1_mbed-dev by
Diff: drivers/DirHandle.h
- Revision:
- 160:d5399cc887bb
- Parent:
- 149:156823d33999
--- a/drivers/DirHandle.h Tue Feb 28 17:13:35 2017 +0000
+++ b/drivers/DirHandle.h Tue Mar 14 16:40:56 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 */
/** @}*/
