feat: add tauri-plugin-opener (#2019)

This commit is contained in:
Amr Bashir
2024-11-20 00:50:02 +02:00
committed by GitHub
parent 1051db406a
commit 383e636a8e
61 changed files with 2346 additions and 7 deletions
+2
View File
@@ -10,6 +10,7 @@ use crate::scope::OpenScope;
use std::str::FromStr;
/// Program to use on the [`open()`] call.
#[deprecated(since = "2.1.0", note = "Use tauri-plugin-opener instead.")]
pub enum Program {
/// Use the `open` program.
Open,
@@ -117,6 +118,7 @@ impl Program {
/// Ok(())
/// });
/// ```
#[deprecated(since = "2.1.0", note = "Use tauri-plugin-opener instead.")]
pub fn open<P: AsRef<str>>(scope: &OpenScope, path: P, with: Option<Program>) -> crate::Result<()> {
scope.open(path.as_ref(), with).map_err(Into::into)
}