func pasteboardPropertyList()

in Diffusion-macOS/DiffusionImage+macOS.swift [98:111]


    func pasteboardPropertyList(forType type: NSPasteboard.PasteboardType) -> Any? {
        if type == NSPasteboard.PasteboardType.fileURL {
            
            // Return the file's data' representation
            return fileURL.dataRepresentation
            
        } else if type.rawValue == UTType.png.identifier {
            
            // Return a PNG data representation
            return pngRepresentation()
        }
        
        return nil
    }