123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566 |
- #pragma once
- #include <libc/sys/types.h>
- #define VFS_ATTR_FILE (1UL << 0)
- #define VFS_ATTR_DIR (1UL << 1)
- #define VFS_ATTR_DEVICE (1UL << 2)
- #define DIR_BUF_SIZE 256
- struct DIR
- {
- int fd;
- int buf_pos;
- int buf_len;
- char buf[DIR_BUF_SIZE];
-
- };
- struct dirent
- {
- ino_t d_ino;
- off_t d_off;
- unsigned short d_reclen;
- unsigned char d_type;
- char d_name[];
- };
- struct DIR *opendir(const char *dirname);
- int closedir(struct DIR *dirp);
- struct dirent* readdir(struct DIR* dir);
|