25 lines
425 B
C
25 lines
425 B
C
#ifndef _LIBC_IO_DIR_H_
|
|
#define _LIBC_IO_DIR_H_
|
|
|
|
#include <dirent.h>
|
|
#include <stddef.h>
|
|
|
|
enum dir_flags {
|
|
DIR_EOF = 0x01u,
|
|
DIR_ERR = 0x02u,
|
|
};
|
|
|
|
struct __opaque_dir {
|
|
enum dir_flags d_flags;
|
|
int d_fd;
|
|
char *d_buf;
|
|
struct dirent d_current;
|
|
size_t d_buf_datalen, d_buf_max;
|
|
size_t d_buf_readptr;
|
|
};
|
|
|
|
extern int __libc_dir_refill(struct __opaque_dir *d);
|
|
extern int __libc_dir_move_next(struct __opaque_dir *d);
|
|
|
|
#endif
|