diff options
Diffstat (limited to 'examples')
-rw-r--r-- | examples/file_selection.rs | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/file_selection.rs b/examples/file_selection.rs index 5436742..5d2d860 100644 --- a/examples/file_selection.rs +++ b/examples/file_selection.rs @@ -5,9 +5,17 @@ use dialog::DialogBox; fn main() -> dialog::Result<()> { let choice = dialog::FileSelection::new("Please select a file") - .title("File Chooser Example") + .title("File Chooser Example (Open)") .path("/etc") .show()?; println!("The user chose: {:?}", choice); + + let choice = dialog::FileSelection::new("Please select a file") + .title("File Chooser Example (Save)") + .mode(dialog::FileSelectionMode::Save) + .path("/etc") + .show()?; + println!("The user chose: {:?}", choice); + Ok(()) } |