ryanmcgrath / cacao

Rust bindings for AppKit (macOS) and UIKit (iOS/tvOS). Experimental, but working!
MIT License
1.79k stars 65 forks source link

feat: add set files util for pasteboard binding #111

Open ClSlaid opened 8 months ago

ClSlaid commented 8 months ago

Hello, I'd like to implement file pasting on OSX, but sadly I know nothing about Swift and Obj-C. Thankfully, I found your project, and I'd like to add a patch to satisfy my need.

This PR merely adds a set_files method to Pasteboard. And it's expected to convert paths you put in to NSURLs and write into the clipboard.

Note that this PR is currently UNTESTED.

ClSlaid commented 8 months ago

I'd be grateful if you could have a look? @ryanmcgrath