#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <Eio.h>
#include <Ecore.h>
{
char *last_slash = strrchr(file, '/');
if (last_slash != NULL && strlen(last_slash) > 1 && last_slash[1] == '.')
}
static void
{
int *number_of_listed_files = (int *)data;
printf("Processing file:%s\n", file);
(*number_of_listed_files)++;
}
static void
{
int *number_of_listed_files = (int *)data;
printf("Number of listed files:%d\n" \
"ls operation is done, quitting.\n", *number_of_listed_files);
}
static void
{
fprintf(stderr, "Something has gone wrong:%s\n", strerror(error));
}
int
main(int argc, char **argv)
{
int number_of_listed_files = 0;
if (argc < 2)
{
fprintf(stderr, "You must pass a path to execute the command.\n");
return -1;
}
eio_file_ls(argv[1], _filter_cb, _main_cb, _done_cb, _error_cb,
&number_of_listed_files);
return 0;
}