This introduces util/fs.c with initial helpers to enumerate directories into a collection, and then sorting them based on lexicographic order. It then switches our two only users of readdir() over to use it, thus getting predictable directory enumeration behavior.
This introduces
util/fs.c
with initial helpers to enumerate directories into a collection, and then sorting them based on lexicographic order. It then switches our two only users ofreaddir()
over to use it, thus getting predictable directory enumeration behavior.