Go to the source code of this file.
Data Structures | |
| struct | file_list |
| Data structure used to store directory's entries. More... | |
Defines | |
| #define | FILE_NUMBER 10 |
| Maximum number of characters for a file name. | |
| #define | BASE_DIR_NOT_FOUND 0 |
| Return code for base_dir_name(): the function did not find the base name. | |
| #define | BASE_DIR_NO_MEM 1 |
| Return code for base_dir_name(): can not allocate memory. | |
| #define | BASE_DIR_FOUND 2 |
| Return code for base_dir_name(): the function found the base name. | |
| #define | DIR_HD |
Functions | |
| int | read_directory (char *dir_name, struct file_list *flist) |
| List the content of a directory (compatible SUN/LINUX). | |
| int | read_directory_only (char *dir_name, struct file_list *flist_out) |
| List the content of a directory, and keeps only the directories. | |
| void | free_file_list (struct file_list *flist) |
| Free all allocated memory after you called read_directory(). | |
| int | base_dir_name (char *dirname, char **res) |
| Extract the directory base name from a file name. | |
Definition in file my_dir.h.
|
||||||||||||
|
Extract the directory base name from a file name.
Definition at line 187 of file dir.c. References BASE_DIR_FOUND, BASE_DIR_NO_MEM, and BASE_DIR_NOT_FOUND. |
|
|
Free all allocated memory after you called read_directory().
Definition at line 162 of file dir.c. References file_list::list, file_list::num, and file_list::total_alloc. Referenced by read_directory_only(). |
|
||||||||||||
|
List the content of a directory (compatible SUN/LINUX).
Definition at line 18 of file dir.c. References FILE_NUMBER, file_list::list, file_list::num, and file_list::total_alloc. Referenced by read_directory_only(). |
|
||||||||||||
|
List the content of a directory, and keeps only the directories.
Definition at line 87 of file dir.c. References free_file_list(), file_list::list, file_list::num, read_directory(), and file_list::total_alloc. |
1.3-rc1