DirectoryDialog

Pops up a dialog box for the user to select a directory.

Constructors

this
this(Window parent, string title)

Construct the dialog.

this
this(string title)

Construct the dialog.

Members

Functions

setDirectoryMustExist
auto setDirectoryMustExist(bool mustExist)

Set if the directory must exist.

setInitialDirectory
auto setInitialDirectory(string directory)

Set the initial directory in the dialog.

show
auto show()

Show the dialog.

Inherited Members

From Dialog

_parent
Window _parent;
Undocumented in source.
_title
string _title;
Undocumented in source.
_results
string[] _results;
Undocumented in source.
getResult
string getResult()

Get the dialog result. This varies on the type of dialog used and will reflect the overall result expected of each dialog.

removeBracesFromResults
void removeBracesFromResults()

Remove any leading or trailing braces.

show
auto show()

Show the dialog.

Examples

auto dialog = new DirectoryDialog("Select a directory")
.setInitialDirectory("~")
.setDirectoryMustExist(true)
.show();

string directory = dialog.getResult();

Result: The full path of the directory selected.

See Also

Meta