Function deskulpt::commands::open_widget_resource
source ยท pub(crate) fn open_widget_resource<R: Runtime>(
app_handle: AppHandle<R>,
widget_id: Option<String>,
path: Option<PathBuf>,
) -> Result<(), String>
Expand description
Command for opening a widget-related resource.
If widget ID is None
, this command will open the widget base directory. Otherwise,
it checks whether the widget ID. If path
is None
, it opens the corresponding
widget directory; otherwise it opens the specified path within the widget directory.
This command will fail if:
- The given widget ID is not found in the widget collection.
- Tauri fails to open the resource.