I was wondering after using computer for a long times it feels like copy paste was fundamental feature but I know it is not. So the question is how does this really work?
I thought of all ideas how this could have been implemented but I get stuck every time I come up with the different file formats like gif, jpg, txt, png, mp3, mp4, JSON, YML etc. and the further you go the complex it gets like shortcuts ,links and then there's directories. Like how it copies images that are in the search result in chrome whereas sometimes you can't copy something due to restriction also you can't select something then you can't copy it whereas sometimes even if you can't select in hierarchy the children are copied so how is it implemented.
But when someone asks me how does copy paste work generally I reply like: When something is copied then it puts the copied item to memory and when pasting it to somewhere the OS finds out the location to where it should be copied and replicates all the file to binary and copies it.
Which might not be true so can you explain how does it exactly work. Also it would be helpful to know how the code was written for copy paste.
The cut command removes the selected data from its original position, while the copy command creates a duplicate; in both cases the selected data is kept in temporary storage (the clipboard). The data from the clipboard is later inserted wherever a paste command is issued.
Copy and paste multiple items using the Office Clipboard Open the file that you want to copy items from. Select the first item that you want to copy, and press CTRL+C. Continue copying items from the same or other files until you have collected all of the items that you want.
The first thing you need to realize is that "copy and paste" as well as "drag and drop" are a form of IPC (Inter-process communication) since the data is being transferred from one application to another. This mechanism is usually provided by the same subsystem or service which is responsible for managing the graphical user interface.
This subsystem provides a mechanism for "source" and "destination" applications to negotiate about the format of the data that should be transferred and if they "agree" on some common format then the data can be transferred.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With