Contents

icon(forFileType:)

Returns an image containing the icon for files of the specified type.

Declaration

func icon(forFileType fileType: String) -> NSImage

Parameters

  • fileType:

    The file type, which may be either a filename extension, an encoded HFS file type, or a universal type identifier (UTI).

Return Value

The icon associated with files of the given type.

Discussion

The returned image has an initial size of 32 pixels by 32 pixels.

You can safely call this method from any thread of your app.

See Also

Related Documentation

Methods