Instance Property

deletingLastPathComponent

A URL created by taking the receiver and removing the last path component. (read-only)

Declaration

var deletingLastPathComponent: URL? { get }

Discussion

If the receiver’s URL represents the root path, this property contains a copy of the original URL. Otherwise, if the original URL has only one path component, this property contains the empty string.