blob: 179bf705be3e938b521e81227a661c4f1a962a8e [file] [log] [blame]
use std::{ffi::OsStr, io, process::Command};
use crate::{CommandExt, IntoResult};
pub fn that<T: AsRef<OsStr>>(path: T) -> io::Result<()> {
Command::new("uiopen")
.arg("--url")
.arg(path.as_ref())
.status_without_output()
.into_result()
}
pub fn with<T: AsRef<OsStr>>(path: T, app: impl Into<String>) -> io::Result<()> {
Command::new("uiopen")
.arg("--url")
.arg(path.as_ref())
.arg("--bundleid")
.arg(app.into())
.status_without_output()
.into_result()
}