Instance Method

iconForFile:

Returns an image containing the icon for the specified file.

Declaration

- (NSImage *)iconForFile:(NSString *)fullPath;

Parameters

fullPath

The full path to the file.

Return Value

The icon associated with the file.

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

- iconForFileType:

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

- 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.