我的用户需要只能选择要保存的文件夹。电子中是否可以只允许通过dialog#showSaveDialog
选择文件夹?过滤器仅适用于文件扩展名,仅提及过滤文件夹。
答案 0 :(得分:1)
I use the showOpenDialog with the openDirectory
flag for this.
Logically it doesn't make sense to "save" a folder since it is just a virtual "container". Allowing the user to select a folder to "open" in order to "save" data into it is the usual flow.