#open #default #launcher #browser

opener

Open a file or link using the system default program

3 releases (breaking)

new 0.3.0 Aug 18, 2018
0.2.0 Aug 8, 2018
0.1.0 Aug 8, 2018

#4 in #browser

Download history 33/week @ 2018-08-11 242/week @ 2018-08-18

91 downloads per month


lib.rs:

This crate provides the [open] function, which opens a file or link with the default program configured on the system.

# fn main() -> Result<(), ::opener::OpenError> {
// open a website
opener::open("https://www.rust-lang.org")?;

// open a file
opener::open("../Cargo.toml")?;
# Ok(())
# }

Platform Implementation Details

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.

MIT OR Apache-2.0 license

Dependencies

Reverse deps