| Crates.io | open_with |
| lib.rs | open_with |
| version | 0.1.2 |
| created_at | 2023-07-06 16:54:22.628363+00 |
| updated_at | 2023-07-18 15:14:29.701419+00 |
| description | Provides a multiplatform invocation interface to the native open-with interface for files. |
| homepage | https://github.com/longmathemagician/open_with |
| repository | https://github.com/longmathemagician/open_with |
| max_upload_size | |
| id | 910095 |
| size | 33,294 |
This library provides a simple multiplatform interface for opening a file with the system default application, invoking the platform's open-with dialog to open a file with one of several programs, revealing the file in the default file manager, or showing the file's properties through the default handler.
Supports Windows through shell-execute, Linux/systemd through xdg-desktop-portal, and macOS through finder automation.
The macOS implementation requires escalated privileges on recent OS versions and is occasionally unreliable for reasons I've been unable to ascertain. If anyone has a better solution for this platform a PR would be greatly appreciated.
let file_path = PathBuf::from("src/lib.rs");
let _result = open_with(file_path);