Instance Method

open(_:)

Opens the location at the specified URL.

Declaration

func open(_ url: URL) -> Bool

Parameters

url

A URL specifying the location to open.

Return Value

true if the location was successfully opened; otherwise, false.

Discussion

It is safe to call this method from any thread in macOS 10.6 and later.

See Also

Opening Files

func openFile(String)

Opens the specified file specified using the default app associated with its type.

func openFile(String, withApplication: String?)

Opens a file using the specified app.

func openFile(String, withApplication: String?, andDeactivate: Bool)

Opens the specified file and optionally deactivates the sending app.

func openFile(String, from: NSImage?, at: NSPoint, in: NSView?)

Opens a file using the default app for its type and animates the action using a custom icon.

Deprecated