Expand description
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")?;An open_browser function is also provided, for when you intend on opening a file or link in
a browser, specifically. This function works like the open function, but explicitly allows
overriding the browser launched by setting the $BROWSER environment variable.
§Crate features
- reveal - Enables usage of the
revealfunction. On Linux this will pull in thedbuscrate. If the dbus-vendored feature is enabled (which it is by default), dbus will use static linking. Otherwise it will be dynamically linked, and some system dependencies will be required to builddbusand also to run any built binaries. Refer to thedbusdocs for the specifics. - dbus-vendored - See the reveal feature.
Enums§
- Open
Error - An error type representing the failure to open a path. Possibly returned by the
openfunction.
Functions§
- open
- Opens a file or link with the system default program.
- open_
browser - Opens a file or link with the system default program, using the
BROWSERenvironment variable when set. - reveal
reveal - Opens the default file explorer and reveals a file or folder in its containing folder.