DropletWorkspaceService
Things a droplet can ask the system to do on the user's behalf.
@MainActor protocol DropletWorkspaceService : AnyObject
Methods
copyToPasteboard(_:)
@discardableResult @MainActor func copyToPasteboard(_ text: String) -> Bool
Copies plain text to the pasteboard. Requires clipboard-write.
open(_:)
@discardableResult @MainActor func open(_ url: URL) -> Bool
Opens a URL in the user's default handler. Returns false when the host refused, which it does for schemes outside http, https, mailto, and file unless the droplet declared them.
revealInFinder(_:)
@MainActor func revealInFinder(_ url: URL)
Reveals a file in Finder.