files/
files.rs

1use clipboard_rs::{Clipboard, ClipboardContext, ContentFormat};
2
3fn main() {
4	let ctx = ClipboardContext::new().unwrap();
5
6	// change the file paths to your own
7	// let files = vec![
8	//     "file:///home/parallels/clipboard-rs/Cargo.toml".to_string(),
9	//     "file:///home/parallels/clipboard-rs/CHANGELOG.md".to_string(),
10	// ];
11
12	// ctx.set_files(files).unwrap();
13
14	let types = ctx.available_formats().unwrap();
15	println!("{:?}", types);
16
17	let has = ctx.has(ContentFormat::Files);
18	println!("has_files={}", has);
19
20	let files = ctx.get_files().unwrap_or_default();
21	println!("{:?}", files);
22}