| Crates.io | clipboard-files |
| lib.rs | clipboard-files |
| version | 0.1.2 |
| created_at | 2022-06-12 22:30:13.195339+00 |
| updated_at | 2024-12-31 01:08:18.795848+00 |
| description | Read file paths from the clipboard |
| homepage | https://github.com/betamos/clipboard-files/ |
| repository | https://github.com/betamos/clipboard-files/ |
| max_upload_size | |
| id | 604777 |
| size | 27,493 |
This crate lets you read file paths from the system wide clipboard, that are copied from Explorer, Finder, etc.
It's supported on Windows, Linux (using GTK) and MacOS.
use clipboard_files;
fn main() {
let files = clipboard_files::read();
println!(files);
}
Not supported, mostly due to lack of support in the Linux and Windows upstream crates. Consider filing a PR in those.
There are several clipboard crates, for instance https://github.com/1Password/arboard. That crate is supported in multiple unix-like environments because it talks X11 directly. This crate uses the GTK bindings for Linux, which offers a much simpler API.
Ideally, all upstream crates should support files. When they do, we'd be better off deleting this one. In the meantime, use this crate.
MIT OR Apache-2.0.