mirror of
https://github.com/tauri-apps/plugins-workspace.git
synced 2026-07-24 17:20:51 +02:00
feat: add tauri-plugin-opener (#2019)
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user