218 int(*filter)(
const struct dirent *),
219 int(*compar)(
const struct dirent **,
const struct dirent **));
Definitions for builtin attributes and compiler directives.
Virtual filesystem support.
#define __RESTRICT
Definition cdefs.h:176
#define NAME_MAX
Max filename length.
Definition limits.h:25
int file_t
File descriptor type.
Definition fs.h:94
DIR * opendir(const char *name)
Open a directory based on the specified name.
void seekdir(DIR *dir, off_t offset)
Not implemented.
int dirfd(DIR *dirp)
Retrieve the file descriptor of an opened directory stream.
int alphasort(const struct dirent **a, const struct dirent **b)
Comparison function for sorting directory entries alphabetically.
void rewinddir(DIR *dir)
Rewind a directory stream to the start of the directory.
struct dirent * readdir(DIR *dir)
Read an entry from a directory stream.
int closedir(DIR *dir)
Closes a directory that was previously opened.
int scandir(const char *__RESTRICT dir, struct dirent ***__RESTRICT namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **))
Scan, filter, and sort files within a directory.
off_t telldir(DIR *dir)
Not implemented.
Type representing a directory stream.
Definition dirent.h:89
file_t fd
File descriptor for the directory.
Definition dirent.h:91
POSIX directory entry structure.
Definition dirent.h:62
char d_name[]
File name.
Definition dirent.h:76
uint16_t d_reclen
Record length.
Definition dirent.h:65
uint8_t d_type
File type.
Definition dirent.h:66
int d_ino
File unique identifier.
Definition dirent.h:63
off_t d_off
File offset.
Definition dirent.h:64