2013-04-16 23:57:27 -04:00
|
|
|
#ifndef _TOKU_DIRENT_H
|
|
|
|
#define _TOKU_DIRENT_H
|
|
|
|
|
2013-04-16 23:57:29 -04:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
2013-04-16 23:57:27 -04:00
|
|
|
//The DIR functions do not exist in windows, but the Linux API ends up
|
2013-04-16 23:57:28 -04:00
|
|
|
//just using a wrapper. We might convert these into an toku_os_* type api.
|
2013-04-16 23:57:27 -04:00
|
|
|
|
2013-04-16 23:57:30 -04:00
|
|
|
enum {
|
|
|
|
DT_UNKNOWN = 0,
|
|
|
|
DT_DIR = 4,
|
|
|
|
DT_REG = 8
|
|
|
|
};
|
|
|
|
|
|
|
|
struct dirent {
|
|
|
|
char d_name[_MAX_PATH];
|
|
|
|
unsigned char d_type;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct __toku_windir;
|
|
|
|
typedef struct __toku_windir DIR;
|
|
|
|
|
|
|
|
|
2013-04-16 23:57:27 -04:00
|
|
|
DIR *opendir(const char *name);
|
|
|
|
|
|
|
|
struct dirent *readdir(DIR *dir);
|
|
|
|
|
|
|
|
int closedir(DIR *dir);
|
|
|
|
|
|
|
|
#ifndef NAME_MAX
|
|
|
|
#define NAME_MAX 255
|
|
|
|
#endif
|
|
|
|
|
2013-04-16 23:57:29 -04:00
|
|
|
#if defined(__cplusplus)
|
|
|
|
};
|
|
|
|
#endif
|
|
|
|
|
2013-04-16 23:57:27 -04:00
|
|
|
#endif
|
|
|
|
|