2 releases

0.1.1 Jun 13, 2022
0.1.0 Jun 12, 2022

#156 in macOS and iOS APIs

Download history 3/week @ 2023-12-29 6/week @ 2024-01-05 82/week @ 2024-01-12 235/week @ 2024-01-19 225/week @ 2024-01-26 210/week @ 2024-02-02 276/week @ 2024-02-09 283/week @ 2024-02-16 231/week @ 2024-02-23 158/week @ 2024-03-01 175/week @ 2024-03-08 157/week @ 2024-03-15 154/week @ 2024-03-22 165/week @ 2024-03-29 103/week @ 2024-04-05

624 downloads per month

MIT/Apache

8KB
127 lines

Clipboard Files

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.

Reading

use clipboard_files;

fn main() {
    let files = clipboard_files::read();
    println!(files);
}

Writing

Not supported, mostly due to lack of support in the Linux and Windows upstream crates. Consider filing a PR in those.

Why?

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.

License

MIT OR Apache-2.0.

Dependencies

~0–3MB
~74K SLoC