Opens the system folder browser and returns the chosen folder’s full path, or 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.
  • nil also covers the rare case where a folder was chosen but Windows could not turn it into a path.
  • It blocks while open.

Example