KallistiOS
##version##
|
Directory entry functionality. More...
Go to the source code of this file.
Data Structures | |
struct | dirent |
POSIX directory entry structure. More... | |
struct | DIR |
Type representing a directory stream. More... | |
Functions | |
DIR * | opendir (const char *name) |
Open a directory based on the specified name. More... | |
int | closedir (DIR *dir) |
Closes a directory that was previously opened. More... | |
struct dirent * | readdir (DIR *dir) |
Read an entry from a directory stream. More... | |
int | dirfd (DIR *dirp) |
Retrieve the file descriptor of an opened directory stream. More... | |
void | rewinddir (DIR *dir) |
Rewind a directory stream to the start of the directory. More... | |
int | scandir (const char *dir, struct dirent ***namelist, int(*filter)(const struct dirent *), int(*compar)(const struct dirent **, const struct dirent **)) |
Not implemented. More... | |
void | seekdir (DIR *dir, off_t offset) |
Not implemented. More... | |
off_t | telldir (DIR *dir) |
Not implemented. More... | |
Directory entry functionality.
This partially implements the standard POSIX dirent.h functionality.
int closedir | ( | DIR * | dir | ) |
Closes a directory that was previously opened.
This function is used to close a directory stream that was previously opened with the opendir() function. You must do this to clean up any resources associated with the directory stream.
dir | The directory stream to close. |
int dirfd | ( | DIR * | dirp | ) |
Retrieve the file descriptor of an opened directory stream.
This function retrieves the file descriptor of a directory stream that was previously opened with opendir().
dirp | The directory stream to retrieve the descriptor of. |
DIR* opendir | ( | const char * | name | ) |
Open a directory based on the specified name.
The directory specified is opened if it exists. A directory stream object is returned for accessing the entries of the directory.
name | The name of the directory to open. |
Read an entry from a directory stream.
This function reads the next entry from the directory stream provided, returning the directory entry associated with the next object in the directory.
dir | The directory stream to read from. |
void rewinddir | ( | DIR * | dir | ) |
Rewind a directory stream to the start of the directory.
This function rewinds the directory stream so that the next call to the readdir() function will return the first entry in the directory.
dir | The directory stream to rewind. |
int scandir | ( | const char * | dir, |
struct dirent *** | namelist, | ||
int(*)(const struct dirent *) | filter, | ||
int(*)(const struct dirent **, const struct dirent **) | compar | ||
) |
Not implemented.
void seekdir | ( | DIR * | dir, |
off_t | offset | ||
) |
Not implemented.
off_t telldir | ( | DIR * | dir | ) |
Not implemented.