Instance Method

iconForFiles:

Returns an image containing the icon for the specified files.

Declaration

- (NSImage *)iconForFiles:(NSArray<NSString *> *)fullPaths;

Parameters

fullPaths

An array of NSString objects, each of which contains the full path to a file.

Return Value

The icon associated with the group of files.

Discussion

If fullPaths specifies one file, that file's icon is returned. If fullPaths specifies more than one file, an icon representing the multiple selection is returned.

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.

- iconForFileType:

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

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