chooseFile(options)
Class: Window.
Description:
Opens file/directory chooser dialog window. Check example for all possible options.
Parameters:
| Name | Type | Description |
|---|---|---|
|
|
JSON Object with valid options. See example for full list of options. |
Returns:
Returns string path if multiple option is false, string[] if multiple option is true, or null if file chooser was closed without making a selection.
Type: string | Array.<string> | null
Examples:
window.chooseFile({
directory: false, // `true` for Directory selection, `false` for Files.
save: true, // `true` for `Save` dialog box, `false` for `Open`.
multiple: false, // [true|false] to be able to select multiple files/folders.
hidden:false, // [true|false] to show hidden files.
filter:"Documents:doc,docx,txt,rtf|Music:mp3,m4a,ogg,wma|Images:gif,jpg,jpeg,bmp,webp", // File extension can have multiple "." characters, such as "file.d.ts".
path:"Initial-Path/file.ext" // Default path to open in the dialog window.
});
