Instance Property

pathExtension

The path extension. (read-only)

Declaration

var pathExtension: String? { get }

Return Value

The path extension of the receiver, or nil if path is nil.

Discussion

This property contains the path extension, unescaped using the replacingPercentEscapes(using:) method. For example, in the URL file:///path/to/file.txt, the path extension is txt.