简体   繁体   中英

How can I put a file path into the clipboard so that it can be pasted as file in a file manager?

I want the user to be able to copy a file that's stored on disk from my GTK application to a normal file manager like Nautilus. How can I do that? I would prefer to just write a path into the clipboard and let the file manager take care of actually copying, is that possible?

I just found an example in which it seems as if the actual file data is transferred through the clipboard – but is that the only possible way?

You need CF_HDROP and possibly other shell clipboard formats. See: http://msdn.microsoft.com/en-us/library/windows/desktop/bb776902(v=vs.85).aspx ;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM