OpenDialogOptions

Options to configure the behaviour of a file open dialog.

  • Note 1: On Windows and Linux, a file dialog cannot be both a file selector and a folder selector, so if you set both canSelectFiles and canSelectFolders to true on these platforms, a folder selector will be shown.

  • Note 2: Explicitly setting canSelectFiles and canSelectFolders to false is futile and the editor then silently adjusts the options to select files.

Online Documentation

Properties

Link copied to clipboard
abstract var canSelectFiles: Boolean?

Allow to select files, defaults to true.

Link copied to clipboard
abstract var canSelectFolders: Boolean?

Allow to select folders, defaults to false.

Link copied to clipboard
abstract var canSelectMany: Boolean?

Allow to select many files or folders.

Link copied to clipboard
abstract var defaultUri: Uri?

The resource the dialog shows when opened.

Link copied to clipboard

A set of file filters that are used by the dialog. Each entry is a human-readable label, like "TypeScript", and an array of extensions, for example:

Link copied to clipboard
abstract var openLabel: String?

A human-readable string for the open button.

Link copied to clipboard
abstract var title: String?

Dialog title.