Created
May 4, 2022 11:58
-
-
Save DanielZanchi/90ef20687af4aa62ab14d0a254097457 to your computer and use it in GitHub Desktop.
copy URL reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if let fileRefURL = (url as NSURL).fileReferenceURL() as NSURL? { | |
print(fileRefURL) | |
let pasteboard = NSPasteboard.general | |
pasteboard.clearContents() | |
pasteboard.writeObjects([fileRefURL]) | |
pasteboard.setString(fileRefURL.relativeString, forType: .fileURL) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment