bx-lib : the Basic X11 Library tuned for C beginners
1.0
|
Functions | |
bx_dir | bx_open_dir (char const path[]) |
bx_dir | bx_open_dir_f (char const format[],...) |
void | bx_close_dir (bx_dir dir) |
int | bx_dir_length (bx_dir dir) |
char * | bx_dir_filename (bx_dir dir, int index) |
bx_dir bx_open_dir | ( | char const | path[] | ) |
Opens a directory given a path name.
path | the path name of the directory |
bx_dir bx_open_dir_f | ( | char const | format[], |
... | |||
) |
Opens a directory given a path format like printf() function families.
format | the printf()-like format yielding the directory path name |
... | the arguments needed by the format specifiers |
void bx_close_dir | ( | bx_dir | dir | ) |
Closes an opened directory after usage. This is necessary in order to clean the allocated resources.
dir | the opened directory to close |
int bx_dir_length | ( | bx_dir | dir | ) |
Gets the length of an opened directory, that is, the number of filenames it contains.
dir | the opened directory |
char* bx_dir_filename | ( | bx_dir | dir, |
int | index | ||
) |
Gets the filename at a given location index insde an opened directory. The index should be in the range 0...bx_dir_length()-1.
dir | the opened directory |
index | a location in the directory |