Folder sorting has been mostly rewritten with V0.9.12, and the documentation for this can be found in
src\filesys\fdrsort.c
.