Displaying 1 result from an estimated 1 matches for "get_dir_list".
Did you mean:
get_dc_list
2007 Nov 15
1
program I used to test xattrs
...de <sys/types.h>
#include <sys/stat.h>
#include <sys/time.h>
#include <attr/xattr.h>
#include <fcntl.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <errno.h>
#include <dirent.h>
#include <unistd.h>
static int get_dir_list(char *dir, char ***filelist)
{
struct dirent **namelist;
int n = 0, temp, i = 0, size = 0;
struct stat buf;
temp = n = scandir(dir, &namelist, NULL, alphasort);
if (n < 0) {
perror("scandir");
return -1;
}
if (n == 2) {
while (n--)
free(namelist[n]);
free(nameli...