Contents

preferredFilenameExtension

The preferred filename extension for the type.

Declaration

var preferredFilenameExtension: String? { get }

Discussion

If available, the preferred (first available) tag of class filenameExtension.

Many types require the generation of a filename; for example, when saving a file to disk. If not nil, the value of this property is the best available filename extension for this type.

The value of this property is equivalent to, but more efficient than:

type.tags[.filenameExtension]?.first

See Also

Obtaining tags