![]() |
![]() |
![]() |
Sort directory entries
#include <sys/types.h> #include <sys/dir.h> struct direct { unsigned long d_fileno; unsigned short d_reclen; unsigned short d_namlen; char d_name[1]; }; int alphasort( struct direct **d1, struct direct **d2);
libc
The alphasort() function sorts an array of directory entries alphabetically. It can be used for the compar parameter to scandir().
Safety: | |
---|---|
Cancellation point | No |
Interrupt handler | Yes |
Signal handler | Yes |
Thread | Yes |
closedir(), opendir(), readdir(), rewinddir(), scandir()
![]() |
![]() |
![]() |