This header provides functions ported from Unix in dirent.h. More...
Data Structures | |
| struct | dirent |
| A structure that describes a directory stream. More... | |
Macros | |
| #define | DT_UNKNOWN 0 |
| Specifies that the file type is unknown. | |
| #define | DT_DIR 4 |
| Specifies that the file type is a directory. | |
Typedefs | |
| typedef struct DIR | DIR |
| A structure that describes a directory stream. | |
Functions | |
| DIR * | opendir (char const *name) |
| Open the given directory. | |
| int | closedir (DIR *dir) |
| Close the given directory. | |
| struct dirent * | readdir (DIR *dir) |
| Read the given directory. | |
Detailed Description
This header provides functions ported from Unix in dirent.h.
Function Documentation
| DIR* opendir | ( | char const * | name | ) |
Open the given directory.
- Parameters
-
name The directory to open.
- Returns
- A pointer to the directory stream.
This function opens the directory name and return the directory stream. On error or if dir is NULL, -1 is returned, and errno is set appropriately (on Windows XP only). On success, 0 is returned.
- See Also
- closedir()
- readdir()
Conformity: None.
Supported OS: Windows XP, CE.
References dirent::d_name, DT_DIR, DT_UNKNOWN, evil_char_to_wchar(), and evil_wchar_to_char().
Referenced by ecore_file_mksubdirs(), eina_file_direct_ls(), eina_file_ls(), and eina_file_stat_ls().
| int closedir | ( | DIR * | dir | ) |
Close the given directory.
- Parameters
-
dir The directory stream to close.
- Returns
- A pointer to the directory stream.
This function closes the stream directory dir. On error or is path is NULL or an empty string, NULL is returned, and errno is set appropriately (on Windows XP only).
Conformity: None.
Supported OS: Windows XP, CE.
Referenced by ecore_file_mksubdirs(), eina_file_direct_ls(), eina_file_ls(), and eina_file_stat_ls().
Read the given directory.
- Parameters
-
dir The directory stream to read.
- Returns
- A pointer to a dirent structure,
NULLoterhwise.
This function returns a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dir. It returns NULL on reaching the end of the directory stream or if an error occurred and errno is set appropriately (on Windows XP only).
Conformity: None.
Supported OS: Windows XP, CE.
References dirent::d_name, and evil_wchar_to_char().
