2002-07-11 18:59:59 +04:00
|
|
|
#ifndef _DIRENT_H
|
|
|
|
#define _DIRENT_H
|
2002-08-20 15:10:51 +04:00
|
|
|
/*
|
|
|
|
** Distributed under the terms of the OpenBeOS License.
|
|
|
|
*/
|
2002-07-11 18:59:59 +04:00
|
|
|
|
2002-08-20 15:10:51 +04:00
|
|
|
#include <sys/types.h>
|
2002-08-03 06:03:27 +04:00
|
|
|
|
2002-07-11 18:59:59 +04:00
|
|
|
|
|
|
|
typedef struct dirent {
|
|
|
|
dev_t d_dev;
|
|
|
|
dev_t d_pdev;
|
|
|
|
ino_t d_ino;
|
|
|
|
ino_t d_pino;
|
|
|
|
unsigned short d_reclen;
|
|
|
|
char d_name[1];
|
|
|
|
} dirent_t;
|
|
|
|
|
|
|
|
typedef struct {
|
|
|
|
int fd;
|
|
|
|
struct dirent ent;
|
|
|
|
} DIR;
|
|
|
|
|
|
|
|
#ifndef MAXNAMLEN
|
|
|
|
# ifdef NAME_MAX
|
|
|
|
# define MAXNAMLEN NAME_MAX
|
|
|
|
# else
|
|
|
|
# define MAXNAMLEN 256
|
|
|
|
# endif
|
|
|
|
#endif
|
|
|
|
|
2002-10-26 17:07:30 +04:00
|
|
|
#ifdef __cplusplus
|
2002-07-11 18:59:59 +04:00
|
|
|
extern "C" {
|
|
|
|
#endif
|
|
|
|
|
|
|
|
DIR *opendir(const char *dirname);
|
|
|
|
struct dirent *readdir(DIR *dirp);
|
|
|
|
int closedir(DIR *dirp);
|
|
|
|
void rewinddir(DIR *dirp);
|
|
|
|
|
2002-10-26 17:07:30 +04:00
|
|
|
#ifdef __cplusplus
|
2002-07-11 18:59:59 +04:00
|
|
|
}
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#endif /* _DIRENT_H */
|
|
|
|
|