Instance Method

iconForFileType:

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

Declaration

- (NSImage *)iconForFileType:(NSString *)fileType;

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.

It is safe to call this method from any thread of your app.

See Also

Managing Icons

- iconForFile:

Returns an image containing the icon for the specified file.

- iconForFiles:

Returns an image containing the icon for the specified files.

- setIcon:forFile:options:

Sets the icon for the file or directory at the specified path.

NSWorkspaceIconCreationOptions

These constants describe the NSWorkspaceIconCreationOptions values used by setIcon:forFile:options:. You can combine these using the C bitwise OR operator.