nil if the user cancelled.
The result is a full machine path, not a workspace path.
Parameters
string
Text shown above the folder tree.
Returns
string | nil
The chosen folder’s full path, or
nil on cancel.Behavior
- Only real folders can be chosen; virtual shell locations are rejected by the dialog.
nilalso covers the rare case where a folder was chosen but Windows could not turn it into a path.- It blocks while open.
Example
Related
openfiledialog: pick a file instead.