}
#else
+ // None of these functions is in POSIX. The functions scandir() and
+ // alphasort() are from BSD 4.3, and have been available under Linux since
+ // libc4. Libc4 and libc5 use the more precise prototype
+
struct dirent **namelist;
int n=scandir(dirName.c_str(), &namelist, 0, alphasort);
+ //if n < 0 should raise error
+
for (int i= 0;i < n; i++)
{
fileName=namelist[i]->d_name;
{
this->push_back(dirName+fileName);
}
+ free(namelist[i]);
}
+ free(namelist);
#endif
}