Type Method

representedPathExtensions(from:)

Returns an array of file types based on the passed pasteboard types.

Declaration

static func representedPathExtensions(from pboardTypes: [NSPasteboard.PasteboardType]) -> [String]?

Discussion

Accepts a null-terminated array of pointers to pasteboard types and returns a null-terminated array of the unique extensions and filenames from the file content and filename types found in the input array. It returns nil if the input array contains no file content or filename types. The returned array is allocated and must be freed by the caller. The pointers in the return array point into strings passed in the input array.

See Also

Matching Pasteboard Types to Filename Extensions

static func fileNameType(forPathExtension: String) -> NSPasteboard.PasteboardType!

Returns a pasteboard type based on the passed file type.