Skip to content

Instance Method

appendPathComponent(_:)

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 append(path:directoryHint:) instead

Appends a path component to the URL.
mutating func appendPathComponent(_ pathComponent: String)

Parameters

pathComponent

The path component to add.

Discussion

Note

This function performs a file system operation to determine if the path component is a directory. If so, it will append a trailing /. If you know in advance that the path component is a directory or not, then use func appendingPathComponent(_:isDirectory:).

New code should use append(path:directoryHint:) instead of this method.