You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/dialog.md
+13-2Lines changed: 13 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -118,7 +118,7 @@ Returns `Promise<Object>` - Resolve with an object containing the following:
118
118
119
119
*`canceled` Boolean - whether or not the dialog was canceled.
120
120
*`filePaths` String[] - An array of file paths chosen by the user. If the dialog is cancelled this will be an empty array.
121
-
*`bookmarks` String[] (optional) _macOS__mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated.
121
+
*`bookmarks` String[] (optional) _macOS__mas_ - An array matching the `filePaths` array of base64 encoded strings which contains security scoped bookmark data. `securityScopedBookmarks` must be enabled for this to be populated. (For return values, see [table here](#bookmarks-array).)
122
122
123
123
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
124
124
@@ -200,7 +200,7 @@ The `filters` specifies an array of file types that can be displayed, see
200
200
Returns `Promise<Object>` - Resolve with an object containing the following:
201
201
*`canceled` Boolean - whether or not the dialog was canceled.
202
202
*`filePath` String (optional) - If the dialog is canceled, this will be `undefined`.
203
-
*`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.
203
+
*`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](#bookmarks-array).)
204
204
205
205
The `browserWindow` argument allows the dialog to attach itself to a parent window, making it modal.
206
206
@@ -335,6 +335,17 @@ On Windows the options are more limited, due to the Win32 APIs used:
335
335
* The `browserWindow` argument is ignored since it is not possible to make
336
336
this confirmation dialog modal.
337
337
338
+
## Bookmarks array
339
+
340
+
`showOpenDialog`, `showOpenDialogSync`, `showSaveDialog`, and `showSaveDialogSync` will return a `bookmarks` array.
341
+
342
+
| Build Type | securityScopedBookmarks boolean | Return Type | Return Value |
0 commit comments