Viewing: dirent.h
📄 dirent.h (Read Only) ⬅ To go back
#ifndef _SYS_DIRENT_H
#define _SYS_DIRENT_H

#include <sys/types.h>

#ifdef __cplusplus
extern "C" {
#endif

#define MAXNAMLEN 255

struct dirent {
    ino_t  d_ino;
    char   d_name[MAXNAMLEN + 1];
};

typedef struct {
    int    dd_fd;
    int    dd_loc;
    int    dd_size;
    char  *dd_buf;
} DIR;

DIR *opendir(const char *);
struct dirent *readdir(DIR *);
int closedir(DIR *);
void rewinddir(DIR *);

#ifdef __cplusplus
}
#endif

#endif /* _SYS_DIRENT_H */