Construct the dialog.
Construct the dialog.
Set if the directory must exist.
Set the initial directory in the dialog.
Show the dialog.
Get the dialog result. This varies on the type of dialog used and will reflect the overall result expected of each dialog.
Remove any leading or trailing braces.
Show the dialog.
auto dialog = new DirectoryDialog("Select a directory") .setInitialDirectory("~") .setDirectoryMustExist(true) .show(); string directory = dialog.getResult();
Result: The full path of the directory selected.
Pops up a dialog box for the user to select a directory.