JUCE FileChooser: Why can't it be configured to select both files and directories?

This is hopefully enough of a JUCE question to be appropriate… but also kind of a win32 question. So calling on JUCE Windows experts here-- I see this code in JUCE’s file chooser:

    const bool selectsFiles       = (flags & FileBrowserComponent::canSelectFiles) != 0;
    const bool selectsDirectories = (flags & FileBrowserComponent::canSelectDirectories) != 0;

    if (useNativeDialogBox && ! (selectsFiles && selectsDirectories))
    if (useNativeDialogBox)
        return showPlatformDialog (*this, flags, previewComp);

    return std::make_unique<NonNative> (*this, flags, previewComp);

Does this mean it is inherently impossible for Windows native file chooser to be able to select both files and directories? Or is there some other reason that JUCE disallows this?

1 Like

If I recall, the open folder dialog is a different class from the open file dialog when using native Windows dialogs.

1 Like