3 ms·
I remember https://en.wikipedia.org/wiki/Shell_Scrap_Object_File https://en.wikipedia.org/wiki/Shell_Scrap_Object_File s. (Most people didn't realize this was a
by derefr 7y ago
I remember https://en.wikipedia.org/wiki/Shell_Scrap_Object_File https://en.wikipedia.org/wiki/Shell_Scrap_Object_File s. (Most people didn't realize this was a thing. I'm not at a Windows PC at the moment: is it still a thing?)
I've always thought it'd make a lot of sense, for any modern OS, if every time you cut something, you'd be creating a .scrap on the desktop; and then, if you later pasted it, the .scrap would go away. Desktop-as-spool-directory. Same as the way macOS tried to use the desktop as a spool for screenshots until recently (where now the screenshot spool has become a mysterious locationless storage displayed in an ephemeral modal window.)
- londons_explore 7y agoThis doesn't work well with multiple drives. If you cut an object from a usb stick, should it get transferred entirely to your desktop (maybe taking many hours for big files), for you to then paste it somewhere else on the usb stick? (When a direct move would be near instant). If instead you want a .scrap directory on every volume, you have a new inconsistency - if something is cut, and the device removed before the paste happens, the paste will fail.
- derefr 7y agoAh, I wasn’t really suggesting that the (contents of the) clipboard be immediately serialized to disk, but rather that an OS built-in clipboard manager be created that exposes its contents as shell objects living on the shell Desktop (rather than the filesystem Desktop.) So every cut would put a shell object onto the shell desktop, but this would just be a handle to a memory object living in the clipboard manager. Pasting would move that object from the shell Desktop, to the shell Trash, such that emptying the Trash would get rid of it; but it wouldn’t really be “in” the filesystem Trash either. If you select and copied the shell object on the shell Desktop, you’d just be making the “selected” clipboard handle the one referenced by the shell object. If you moved the shell object, you’d be instantiating a physical filesystem .scrap object at the destination. And, of course, since all this is simulating something persistent, you’d expect the clipboard manager to make each clipboard object refcounted, and not get rid of objects as long as something (e.g. a shell object) holds a reference to them; even meaning that the clipboard objects with nonzero reference-counts would need to be persisted to an OS “clipboard database” on shutdown, such that the shell objects referencing them would still be valid on next startup.