LICK
 All Data Structures Files Functions Variables Enumerations Enumerator
Functions
scandir.h File Reference

An implementation of scandir, since MinGW does not include one. More...

#include <dirent.h>
Include dependency graph for scandir.h:

Go to the source code of this file.

Functions

int alphasort2 (const struct dirent **a, const struct dirent **b)
 
int antialphasort2 (const struct dirent **a, const struct dirent **b)
 
int scandir2 (const char *path, struct dirent ***e, int(*filter)(const struct dirent *), int(*compare)(const struct dirent **, const struct dirent **))
 scan a directory, returning relevant files More...
 
int scandir_full_path (const char *path, struct dirent ***e, int(*filter)(const char *), int(*compare)(const struct dirent **, const struct dirent **))
 scan a directory, returning relevant files. List scandir2, but filters using the full path of the file More...
 

Detailed Description

An implementation of scandir, since MinGW does not include one.

Function Documentation

int scandir2 ( const char *  path,
struct dirent ***  e,
int(*)(const struct dirent *)  filter,
int(*)(const struct dirent **, const struct dirent **)  compare 
)

scan a directory, returning relevant files

Parameters
path[in]the directory to search
e[out]an array of dirents returned
filter[in]a predicate to determine if a dirent should be returned
compare[in]a function to determine the order of the return values
Returns
the number of files returned if successful, or a negative number on error
int scandir_full_path ( const char *  path,
struct dirent ***  e,
int(*)(const char *)  filter,
int(*)(const struct dirent **, const struct dirent **)  compare 
)

scan a directory, returning relevant files. List scandir2, but filters using the full path of the file

Parameters
path[in]the directory to search
e[out]an array of dirents returned
filter[in]a predicate to determine if a dirent should be returned, by the full path name of the file
compare[in]a function to determine the order of the return values
Returns
the number of files returned if successful, or a negative number on error