ShowOpenDialog

Function ShowOpenDialog 

Source
pub fn ShowOpenDialog(
    Options: Option<OpenDialogOptionsDTO>,
) -> ActionEffect<Arc<dyn UserInterfaceProvider>, CommonError, Option<Vec<PathBuf>>>
Expand description

Creates an effect that, when executed, will display a native dialog for opening files or folders.

It uses the UserInterfaceProvider capability from the environment to orchestrate the interaction with the frontend, which is responsible for showing the actual OS-level dialog.

§Parameters

  • Options: An Option<OpenDialogOptionsDTO> containing settings for the dialog, such as the title, whether to allow multiple selections, and if it should select folders instead of files.

§Returns

An ActionEffect that resolves with an Option<Vec<PathBuf>>, containing the list of paths selected by the user, or None if the dialog was cancelled.