Type Method

fileContentsType(forPathExtension:)

Returns a pasteboard type based on the passed file type.

Declaration

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

Discussion

Returns an NSString to a pasteboard type representing a file’s contents based on the supplied string fileType. fileType should generally be the extension part of a filename. The conversion from a named file type to a pasteboard type is simple; no mapping to standard pasteboard types is attempted.

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.

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

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