Contents

appending(components:directoryHint:)

Returns a new URL by appending multiple path components to the URL, with a hint for handling directory awareness.

Declaration

func appending<S>(components: S..., directoryHint: URL.DirectoryHint = .inferFromPath) -> URL where S : StringProtocol

Parameters

  • components:

    The path components to add, as a variadic parameter.

  • directoryHint:

    A hint to the initializer to indicate whether the path is a directory, or to instruct the method to make this determination. Defaults to Inferfrompath.

Return Value

A new URL that appends the specified components to the original URL.

See Also

Adding path components