How OSX Swift4 writes files to the clipboard

I want to do a macOS application, and now it"s mainly stuck on the clipboard.

would like to ask the gods, swift how to copy the file to the clipboard, and then right-click in the Finder to paste the file?

Note: copy the file, not the text, the text is too simple, the file really did not find a way to use it.

Mar.03,2021
Menu