123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104 |
-
- #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 "FileHandle.h"
-
- struct dirent {
- char d_name[NAME_MAX+1];
- };
-
- namespace mbed {
-
-
- class DirHandle {
-
- public:
-
-
- virtual int closedir()=0;
-
-
-
- virtual struct dirent *readdir()=0;
-
-
-
- virtual void rewinddir()=0;
-
-
-
- virtual off_t telldir() { return -1; }
-
-
-
- virtual void seekdir(off_t location) { }
-
- virtual ~DirHandle() {}
- };
-
- }
-
- 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
|