I'm developing a cross-platform clipboard sharing software and currently working on implementing file copying functionality.

On Windows, I can achieve file copy by creating an IDataObject and IStream, and then putting the dataObject into the clipboard. However, I need guidance on how to achieve similar functionality on macOS.

Additionally, on Linux, I utilize Fuse to create a temporary file system for clipboard file sharing over the network and customize file read operations.

RDP (Remote Desktop Protocol) During my research, I observed the behavior of file copying in 'Microsoft Remote Desktop for MacOS' software using the RDP (Remote Desktop Protocol). When I copy files within the remote desktop, the macOS clipboard stores a list of temporary files corresponding to the remote files. The displayed attributes, such as file size and permissions, are correct when accessing these files. Strangely, when I attempt to view the binary data of these temporary files using 'vi' or other methods from the command line, I find that the file content appears to be empty. However, after pasting the files from the Finder file manager, the content of the files gets filled with data. In addition, I discovered that macOS provides NSFileCoordinator, which can be utilized for file access synchronization. However, I am currently unsure about how to use it.

What is the recommended approach to implement file copying and clipboard sharing on macOS, considering cross-platform compatibility?

0

There are 0 best solutions below