Structure

NSWorkspace.IconCreationOptions

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

Declaration

struct IconCreationOptions

Topics

Constants

static var excludeQuickDrawElementsIconCreationOption: NSWorkspace.IconCreationOptions

Suppress generation of the QuickDraw format icon representations that are used in macOS 10.0 through macOS 10.4.

static var exclude10_4ElementsIconCreationOption: NSWorkspace.IconCreationOptions

Suppress generation of the new higher resolution icon representations that are supported in macOS 10.4.

Relationships

Conforms To

See Also

Managing Icons

func icon(forFile: String) -> NSImage

Returns an image containing the icon for the specified file.

func icon(forFileType: String) -> NSImage

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

func icon(forFiles: [String]) -> NSImage?

Returns an image containing the icon for the specified files.

func setIcon(NSImage?, forFile: String, options: NSWorkspace.IconCreationOptions) -> Bool

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