16 #ifndef __SYS_DIRENT_H 
   17 #define __SYS_DIRENT_H 
  131             int(*filter)(
const struct dirent *),
 
  132             int(*compar)(
const struct dirent **, 
const struct dirent **));
 
DIR * opendir(const char *name)
Open a directory based on the specified name. 
void rewinddir(DIR *dir)
Rewind a directory stream to the start of the directory. 
Virtual filesystem support. 
POSIX directory entry structure. 
Definition: dirent.h:30
struct dirent * readdir(DIR *dir)
Read an entry from a directory stream. 
uint16 d_reclen
Record length. 
Definition: dirent.h:33
char d_name[256]
Filename. 
Definition: dirent.h:35
int dirfd(DIR *dirp)
Retrieve the file descriptor of an opened directory stream. 
Type representing a directory stream. 
Definition: dirent.h:48
file_t fd
File descriptor for the directory. 
Definition: dirent.h:49
uint8 d_type
File type. 
Definition: dirent.h:34
unsigned short uint16
16-bit unsigned integer 
Definition: types.h:29
off_t telldir(DIR *dir)
Not implemented. 
int closedir(DIR *dir)
Closes a directory that was previously opened. 
void seekdir(DIR *dir, off_t offset)
Not implemented. 
unsigned char uint8
8-bit unsigned integer 
Definition: types.h:30
int file_t
File descriptor type. 
Definition: fs.h:86
int d_ino
File unique identifier. 
Definition: dirent.h:31
off_t d_off
File offset. 
Definition: dirent.h:32
int scandir(const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **))
Not implemented.