디렉토리 훑기
DIR *dir_stream;
struct dirent *dir_entry;
if((dir_stream=opendir(".")) == NULL)
{
perror("open error");
return;
}
while((dir_entry = readdir(dir_stream)) != NULL)
{
printf("name = %s\n", dir_entry->d_name);
}