|Newbie questions about Pliant
Copy-Paste in UI
How do I copy/paste files using the new UI file manager?
|Message posted by maybe Boris Reitman on 2007/11/22 09:17:08
|I want to copy a file from one machine, and paste it in another. How
do I do that ? I found out how to copy, but how do I paste ?
|Message posted by maybe Hubert Tonneau on 2007/11/25 00:43:58
|The copy past feature in the UI is implemented through Pliant lockers.
Lockers are implemented in /pliant/util/pml/locker.pli
and used by /pliant/appli/file.ui
When you call 'locker_create', you provide some body which will be executed
later, and receive a ticket.
So, the file cut/past protocol is the following:
when we copy, we call 'locker_create' to get a ticket, and copy the ticket
to the clipboard using 'clipboard_write'
When we past, we do 'clipboard_read' to get the tickets. Then we use
'locker_use' to get the content of the files.
The key advantage of this system is that what is exchanged through the browser
clipboard is light: it's not the content of the files, but just a ticket (a
kind of password) that enable the receipient machine to get them directly from
the emitting machine.
The disadvantage is that the receipient machine must be abble to connect to
the emitting machine because the UI client will not be a usable middleman.