aboutsummaryrefslogtreecommitdiff
path: root/examples/file_selection.rs
blob: 543674249a1310dd35e5ce09dd9a83ea5063adc9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
// Copyright (C) 2019 Robin Krahl <robin.krahl@ireas.org>
// SPDX-License-Identifier: MIT

use dialog::DialogBox;

fn main() -> dialog::Result<()> {
    let choice = dialog::FileSelection::new("Please select a file")
        .title("File Chooser Example")
        .path("/etc")
        .show()?;
    println!("The user chose: {:?}", choice);
    Ok(())
}