Hm, from userland it's just:

#include <dirent.h>

int main()
{
struct dirent **namelist;
int i, n;

n = scandir(".", &namelist, 0, alphasort);
if ( n < 0 )
perror("scandir");
else
for (i=0; i < n; i++ ) printf("%s\n", namelist[i]->d_name);
}

.
Not sure if that helps you, though.
_________________________
- Tony C
my empeg stuff