This crate provides the
open function, which opens a file or link with the default program
configured on the system.
// open a website opener::open("https://www.rust-lang.org")?; // open a file opener::open("../Cargo.toml")?;
On Windows the
ShellExecuteW Windows API function is used. On Mac the system
open command is
used. On other platforms, the
xdg-open script is used. The system
xdg-open is not used;
instead a version is embedded within this library.
An error type representing the failure to open a path. Possibly returned by the
Opens a file or link with the system default program.