Skip to content

ElectronDialog.showOpenDialogSync method

ElectronDialog › showOpenDialogSync

Unofficial

Shows an open file dialog, blocking the process until it is closed.

Signature:

showOpenDialogSync(browserWindow: ElectronBrowserWindow, options: ElectronOpenDialogSyncOptions): string[] | undefined

Parameters:

ParameterTypeDescription
browserWindowElectronBrowserWindowThe parent window.
optionsElectronOpenDialogSyncOptionsThe open dialog options.

Returns: string[] | undefinedThe file paths chosen by the user, or undefined if the dialog is cancelled.


Unofficial

Shows an open file dialog, blocking the process until it is closed.

Signature:

showOpenDialogSync(options: ElectronOpenDialogSyncOptions): string[] | undefined

Parameters:

ParameterTypeDescription
optionsElectronOpenDialogSyncOptionsThe open dialog options.

Returns: string[] | undefinedThe file paths chosen by the user, or undefined if the dialog is cancelled.