Currently the DirectoryContentsList class sorts folders and files according to the convention of the operating system: On Windows folders are displayed before files, on OS X folders and files are sorted alphabetically.
Here is the portion of DirectoryContentsList’s addFile method that decides which sorting method to use:
#if JUCE_WINDOWS
if (a->isDirectory != b->isDirectory)
return a->isDirectory;
#endif
return a->filename.compareNatural (b->filename) < 0;
I agree that this should be the default behaviour, but I would love for this to be a user configurable option, so that cross-platform consistency can be achieved if the user desires it.
i.e. I’d love for DirectoryContentsList to include a setting that allows folders to be displayed first, or alphabetical sorting, regardless of platform.