DirectoryContentsList folders on top OS X

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 (a->isDirectory != b->isDirectory)
    return a->isDirectory;

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.

1 Like

…and to support this request, I’ll add that currently also Finder on macOS has an option for that: