You really don't need a "linked-list" for this, the content is not dynamic. The only variable factor is the length of the list.
Since readdir already supplies struct dirent, just use an array of them.
Code:
#include <stdio.h>
#include <dirent.h>
#include <stdlib.h>
int main (int argc, char *argv[]) {
short int i=0,n;
struct dirent *dentry;
struct dirent *Dray;
DIR *dir = opendir(argv[1]);
if (dir == NULL) {perror("opendir fail");return -1;}
Dray=malloc(sizeof(*Dray));
while((dentry=readdir(dir)) != NULL) {
if (i>0) Dray=realloc(Dray,(i+1)*sizeof(*Dray));
Dray[i]=*dentry;
i++;
}
closedir(dir);
for (n=0;n<i;n++) printf("%s: %d\n",Dray[n].d_name,Dray[n].d_type);
}
Alternately, you could make Dray it's own kind of struct and just retain the fields from dirent that you want.