This exemple show how to list the files in a directory ex : use case with SRM plugin : ./gfal_testdir srm://grid05.lal.in2p3.fr:8446/dpm/lal.in2p3.fr/home/dteam/test_r2d2
#include <stdio.h>
#include <stdlib.h>
main(int argc, char **argv)
{
struct dirent *d;
DIR *dir;
if (argc != 2) {
fprintf (stderr, "usage: %s filename\n", argv[0]);
exit (1);
}
perror ("gfal_opendir");
exit (1);
}
printf ("%s\n", d->d_name);
}
perror ("gfal_closedir");
exit (1);
}
exit (0);
}