rustc/vendor/open
2019-04-29 16:16:11 -07:00
..
etc/sublime-text New upstream version 1.32.0~beta.2+dfsg1 2018-12-16 10:13:16 -08:00
src New upstream version 1.32.0~beta.2+dfsg1 2018-12-16 10:13:16 -08:00
.cargo-checksum.json New upstream version 1.33.0+dfsg1 2019-04-29 16:16:11 -07:00
Cargo.toml New upstream version 1.32.0~beta.2+dfsg1 2018-12-16 10:13:16 -08:00
changelog.md New upstream version 1.32.0~beta.2+dfsg1 2018-12-16 10:13:16 -08:00
LICENSE.md New upstream version 1.32.0~beta.2+dfsg1 2018-12-16 10:13:16 -08:00
README.md New upstream version 1.32.0~beta.2+dfsg1 2018-12-16 10:13:16 -08:00

Build Status

Use this library to open a path or URL using the program configured on the system. It is equivalent to running one of the following:

# OSX
$ open <path-or-url>
# Windows
$ start <path-or-url>
# Linux
$ open <path-or-url> || xdg-open <path-or-url> || gnome-open <path-or-url> || kde-open <path-or-url>

Usage

Add this to your Cargo.toml

[dependencies]
open = "*"

Add this to your lib ...

extern crate open;

... and open something using

open::that("https://rust-lang.org");

Follow this link for the massive API docs.

Credits

The implementation is based on the respective functionality of cargo, but was improved to allow some error handling.