Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface 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.

层级

  • OpenDialogOptions

索引

Properties(7)

Optional defaultUri

defaultUri: Uri

The resource the dialog shows when opened.

Optional openLabel

openLabel: string

A human-readable string for the open button.

Optional canSelectFiles

canSelectFiles: boolean

Allow to select files, defaults to true.

Optional canSelectFolders

canSelectFolders: boolean

Allow to select folders, defaults to false.

Optional canSelectMany

canSelectMany: boolean

Allow to select many files or folders.

Optional filters

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[]

Optional title

title: string

Dialog title.

This parameter might be ignored, as not all operating systems display a title on open dialogs (for example, macOS).

VS Code 插件开发中文文档 | VS Code 中文文档 | VS Code 官网文档 | VS Code 扩展市场

Generated by TypeDoc | 站长统计