What is the required DataFlavor to copy files in Mac OSX

后端 未结 2 1700
一向
一向 2021-01-05 09:58

I\'m currently working on Java code that can copy files into the system clipboard.

For Windows and Linux I already got it working. For OSX I tried several flavors bu

2条回答
  •  萌比男神i
    2021-01-05 10:44

    Maybe you should try DataFlavor#javaFileListFlavor.

    Excerpt from the API documentation:

    DataFlavor#javaFileListFlavor (Link)

    To transfer a list of files to/from Java (and the underlying platform) a DataFlavor of this type/subtype and representation class of java.util.List is used. Each element of the list is required/guaranteed to be of type java.io.File.

提交回复
热议问题