#ifndef __RTT_DIRENT_H__
#define __RTT_DIRENT_H__
#include <rtthread.h>
#include <rtlibc.h>
#define FT_REGULAR 0
#define FT_SOCKET 1
#define FT_DIRECTORY 2
#define FT_USER 3
#ifdef __cplusplus
extern "C" {
#endif
#ifndef HAVE_DIR_STRUCTURE
typedef struct
{
int fd;
char buf[512];
int num;
int cur;
} DIR;
#endif
#ifndef HAVE_DIRENT_STRUCTURE
struct dirent
{
rt_uint8_t d_type;
rt_uint8_t d_namlen;
rt_uint16_t d_reclen;
char d_name[256];
};
#endif
int closedir(DIR *);
DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int readdir_r(DIR *, struct dirent *, struct dirent **);
void rewinddir(DIR *);
void seekdir(DIR *, long int);
long telldir(DIR *);
#ifdef __cplusplus
}
#endif
#endif