zapisz listę plików w tablicy lub coś innego C

Mam tę funkcję

void file_listing(){
    DIR *dp;
    struct stat fileStat;
    struct dirent *ep;
    int file=0;
    dp = opendir ("./");

    if (dp != NULL){
        while ((ep = readdir(dp))){
            char *c = ep->d_name;
            char d = *c; /* first char */
            if((file=open(ep->d_name,O_RDONLY)) < -1){ 
                perror("Errore apertura file");
            }
            if(fstat(file,&fileStat)){ /*file info */
                perror("Errore funzione fstat");
            }
            if(S_ISDIR(fileStat.st_mode)){ /* directory NOT listed */
                continue;
            }
            else{
                if(d != '.'){ /* if filename DOESN'T start with . will be listed */
                    "save into someting" (ep->d_name);
                }
                else{
                    continue; /* altrimenti non lo listo */
                }
            }
        }
        (void) closedir (dp);
    }
    else{
        perror ("Impossibile aprire la directory");
        return 1;
    }
}

Chcę zapisać do tablicy lub struktury lub listy lub coś innego w wyniku listowania plików, ale nie wiem, jak to zrobić.
Z góry dziękuję!

questionAnswers(2)

yourAnswerToTheQuestion