Bruce Momjian writes:
> OK, I did the readdir() thing. I hope it is safe to unlink a file while
> in a readdir() loop.
The only portable member of struct dirent is d_name. (Do you really
expect non-regular files in the sort directory?) Also, lots of error
checks (after opendir, readdir, mkdir, unlink) are missing.
--
Peter Eisentraut peter_e@gmx.net http://funkturm.homeip.net/~peter