FileChooser::browseForMultipleDirectories

#1

There is FileChooser::browseForMultipleFilesOrDirectories and FileChooser::browseForMultipleFilesToOpen, but no way to ask the user for a list that is restricted to directories only. I added it to my own fork in about 5 minutes, but would be nice for it to be in JUCE proper. :slight_smile:

0 Likes

#2

Did you consider opening a Pull Request? Or could you share your code so someone else can open a Pull Request?

0 Likes

#3

Apart from getting the tabs wrong in the .cpp file, it’s here and otherwise correct. Saying it takes 5 minutes is probably over-estimating; copy/paste of the browseForMultipleFilesOrDirectories method minus the canSelectFiles option, it doesn’t seem worthwhile of a PR, plus I’m still not entirely clear on

We don’t accept third party GitHub pull requests directly

0 Likes

#4

I went ahead and opened a PR: https://github.com/WeAreROLI/JUCE/pull/495

0 Likes

#5

This only works correctly on macOS, it’s not currently possible with the native Windows or Linux file browsers which is probably why the method is missing from the FileChooser API.

0 Likes

#6

Damn. Thanks for the info.

0 Likes