Instance Method

deletingLastPathComponent()

Returns a URL constructed by removing the last path component of self.

Declaration

func deletingLastPathComponent() -> URL

Discussion

This function may either remove a path component or append /...

If the URL has an empty path (e.g., http://www.example.com), then this function will return the URL unchanged.

See Also

Removing Path Components

func deleteLastPathComponent()

Returns a URL constructed by removing the last path component of self.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software