Added additional examples for open
and open_multiple
in documentation.
This commit is contained in:
parent
4018fd1177
commit
ca061b9c1a
1 changed files with 9 additions and 0 deletions
|
@ -189,6 +189,10 @@ pub async fn message(message: &str, options: Option<MessageDialogOptions>) {
|
|||
/// use tauri_api::dialog::{open, OpenDialogOptions};
|
||||
///
|
||||
/// let file = open(None).await;
|
||||
///
|
||||
/// let mut opts = OpenDialogOptions::new();
|
||||
/// opts.directory = true;
|
||||
/// let dir = open(Some(opts)).await;
|
||||
/// ```
|
||||
/// @param options Dialog options.
|
||||
/// @returns List of file paths, or `None` if user cancelled the dialog.
|
||||
|
@ -214,6 +218,11 @@ pub async fn open(options: Option<OpenDialogOptions>) -> Option<PathBuf> {
|
|||
/// use tauri_api::dialog::{open, OpenDialogOptions};
|
||||
///
|
||||
/// let files = open_multiple(None).await;
|
||||
///
|
||||
/// let mut opts = OpenDialogOptions::new();
|
||||
/// opts.multiple = true;
|
||||
/// opts.directory = true;
|
||||
/// let dirs = open(Some(opts)).await;
|
||||
/// ```
|
||||
/// @param options Dialog options.
|
||||
/// @returns List of file paths, or `None` if user cancelled the dialog.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue