-
Notifications
You must be signed in to change notification settings - Fork 13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to differentiate between files that have been either cut or copied #27
Comments
I don't think WinAPI distinguish between these cases or at least it is not exposed in public API as far as I know |
I am using this for a file explorer app and want clipboard operations between my app and the windows file explorer to function properly together. Clearly the windows file explorer has a way to distinguish between cut and copied files, although I am not sure whether this is tracked by some form of internal state or by the clipboard data itself. I would assume that this data would be included in the clipboard data itself, although I am no expert on the windows api and am not entirely sure. |
Well, in case of windows explorer when you perform Cut/Copy, it is performed via explorer always (even when you use keyboard shortcut, it is handled by explorer) so I would assume it remembers every file copied/cut If you can find way to access this status, I do not mind to expose it in this crate, but unfortunately I myself is not aware of way to do so. |
As you can see here, when cutting a file and then inspecting the clipboard using the InsideClipboard app (https://www.nirsoft.net/utils/inside_clipboard.html), it shows a preferred drop effect of 02 00 00 00. And then when I copy that exact same file, and then inspecting the clipboard, it shows a preferred drop effect of 05 00 00 00 I found a webpage that I assume documents this functionality: https://learn.microsoft.com/en-us/windows/win32/com/dropeffect-constants, although considering this was based on a google search, once again I am not certain. |
Thanks, that's good hint I guess they store this information as sort of hint. It is unfortunate that this tool is closed sourced |
When reading and writing to the clipboard using the FileList format, how can I specify and detect whether a file/folder has been cut or copied.
The text was updated successfully, but these errors were encountered: