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 dialogdirectory: The directory to start in (path or URL)
Parameters
| Name | Type | Description |
|---|---|---|
options | any (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
}