Contents

appendingPathExtension(for:)

Returns a URL by appending the path extension for a uniform type identifier.

Declaration

func appendingPathExtension(for contentType: UTType) -> URL

Parameters

  • contentType:

    The uniform type identifer to use for the extension.

Return Value

A new URL with the type’s preferred extension appended.

Discussion

For more information about types, see Uniform Type Identifiers.

See Also

Modifying and Converting a File URL