As far as I can tell showOpenFilePicker() can only be used to select one or multiple files but no directory. On the other hand showDirectoryPicker() can select a directory but no individual files.
When a website can handle files and directories it needs to add two distinct buttons for the user to chose upfront what they want to select before opening the picker.
At least on macOS applications like Visual Studio Code can open file dialogs which support selecting anything. The user can select a single file, mutiple files, a directory, multiple directories, or any combination of the aforementioned options. It would be nice to offer the same flexibility for websites.