Instance Property
path
iOS 8.0+Deprecated
iPadOS 8.0+Deprecated
Mac Catalyst 8.0+Deprecated
macOS 10.10+Deprecated
tvOS 9.0+Deprecated
visionOS 1.0+Deprecated
watchOS 2.0+Deprecated
Deprecated
Use path(percentEncoded:) instead
The path component of the URL if the URL conforms to RFC 3986; otherwise, an empty string.
var path: String { get }
Return Value
The path, or an empty string if the URL has an empty path.
Discussion
Note
This function resolves against the base URL.
New code should use path(percentEncoded:) instead of this property.