Function “chooseDirectory”

function chooseDirectory([options])

Prompts the user to choose a directory

The file chooser dialog can be customized with the following options:

  • message: A message to display within the dialog
  • directory: The directory to start in (path or URL)

Parameters

NameTypeDescription
optionsany (optional)An optional object specifying additional settings for the dialog

Return Value

If the user has chosen a directory its URL is returned - otherwise returns an empty string.

Example

dir = chooseDirectory({
	message: "Choose a library directory:"
});
if (dir != "") {
	// work with chosen library directory
}