is there a more portable way to do this?
PHP Code:
DIR *currentdir;
struct dirent *entry;
currentdir = opendir (".");
if (currentdir)
{
while ((entry = readdir (currentdir)))
if (strstr ((*entry).d_name, ".wav"))
do_stuff ((*entry).d_name);
closedir (currentdir);
}
else
printf ("error opening current directory\n");