feat(dirent): directory iteration

This commit is contained in:
2026-09-05 21:08:57 -04:00
parent a2f7c33601
commit 5af4197ee9
14 changed files with 1139 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <dirent.h>
#include <string.h>
#if VLIBC_LEVEL_GE(2)
/*
* alphasort (todo 24, XSI): the scandir comparator that orders entries by
* strcmp on their names. Receives two pointers to the array's struct
* dirent pointers.
*/
int
alphasort(const struct dirent **a, const struct dirent **b)
{
return strcmp((*a)->d_name, (*b)->d_name);
}
#endif /* VLIBC_LEVEL_GE(2) */