showSaveDialog

Resolve with an object containing the following:

  • canceled boolean - whether or not the dialog was canceled.

  • filePath string - If the dialog is canceled, this will be an empty string.

  • bookmark string (optional) macOS mas - Base64 encoded string which contains the security scoped bookmark data for the saved file. securityScopedBookmarks must be enabled for this to be present. (For return values, see table here.)

The browserWindow argument allows the dialog to attach itself to a parent window, making it modal.

The filters specifies an array of file types that can be displayed, see dialog.showOpenDialog for an example.

Note: On macOS, using the asynchronous version is recommended to avoid issues when expanding and collapsing the dialog.