Directories - Reading and sorting directories. readdir.c - Reading a directory (readdir). dirsortsize.c - Sort a directory by file size (scandir). dirsortalpha.c - Sort a directory alphabetically (scandir).