Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface OpenDialogOptions

Options to configure the behaviour of a file open dialog.

  • Note 1: A dialog can select files, folders, or both. This is not true for Windows which enforces to open either files or folder, but not both.
  • Note 2: Explicitly setting canSelectFiles and canSelectFolders to false is futile and the editor then silently adjusts the options to select files.

Hierarchy

  • OpenDialogOptions

Index

Properties

canSelectFiles?: boolean

Allow to select files, defaults to true.

canSelectFolders?: boolean

Allow to select folders, defaults to false.

canSelectMany?: boolean

Allow to select many files or folders.

defaultUri?: Uri

The resource the dialog shows when opened.

filters?: {}

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, e.g.

{
'Images': ['png', 'jpg']
'TypeScript': ['ts', 'tsx']
}

Type declaration

  • [name: string]: string[]
openLabel?: string

A human-readable string for the open button.

title?: string

Dialog title. This parameter might be ignored, as not all operating systems display a title on open dialogs.