Вот это у меня работает.
int Panel::ScanDir()
{
DIR *dp;
struct dirent *ep;
struct stat buf;
CurrentDir="./";
dp=opendir(CurrentDir);
if(dp != NULL)
{
while( ep=readdir(dp))
{
stat(ep->d_name,&buf);
// ListBox->insertItem(s);
}
closedir(dp);
return 0;
}
return 1;
}
А вообще найди доку по glibc.