2018-10-24 13:43:52 +03:00
|
|
|
#pragma once
|
|
|
|
|
2018-10-31 04:09:11 +03:00
|
|
|
#include <sys/cdefs.h>
|
|
|
|
#include <sys/types.h>
|
2018-10-24 13:43:52 +03:00
|
|
|
|
2018-10-31 04:09:11 +03:00
|
|
|
__BEGIN_DECLS
|
2018-10-24 13:43:52 +03:00
|
|
|
|
|
|
|
struct dirent {
|
|
|
|
ino_t d_ino;
|
|
|
|
off_t d_off;
|
|
|
|
unsigned short d_reclen;
|
|
|
|
unsigned char d_type;
|
|
|
|
char d_name[256];
|
|
|
|
};
|
|
|
|
|
2018-11-05 20:16:00 +03:00
|
|
|
struct __DIR {
|
2018-10-24 13:43:52 +03:00
|
|
|
int fd;
|
2018-11-05 20:16:00 +03:00
|
|
|
struct dirent cur_ent;
|
2018-10-24 13:43:52 +03:00
|
|
|
char* buffer;
|
|
|
|
size_t buffer_size;
|
|
|
|
char* nextptr;
|
|
|
|
};
|
2018-11-05 20:16:00 +03:00
|
|
|
typedef struct __DIR DIR;
|
2018-10-24 13:43:52 +03:00
|
|
|
|
|
|
|
DIR* opendir(const char* name);
|
2018-11-05 21:01:22 +03:00
|
|
|
int closedir(DIR*);
|
|
|
|
struct dirent* readdir(DIR*);
|
2018-10-24 13:43:52 +03:00
|
|
|
|
2018-10-31 04:09:11 +03:00
|
|
|
__END_DECLS
|
2018-10-24 13:43:52 +03:00
|
|
|
|