Skip to main content

pick_open_file

Function pick_open_file 

Source
pub fn pick_open_file(
    title: &'static str,
    extensions: &'static [&'static str],
    on_done: Box<dyn FnOnce(Option<PickedFile>) + Send + 'static>,
)
Expand description

Non-blocking single-file open dialog. Works on every target: desktop spawns a thread running the native blocking dialog. Android spawns a thread driving the Activity picker. WASM runs the browser picker on the main thread. on_done(None) fires on cancel/error.