Trash

Wine Trash implementation

Wine contains the Trash implemented basing on the freedesktop spec version 0.7 (see http://www.ramendik.ru/docs/trashspec.html).The trashing code is called from SHFileOperation when called with FO_DELETE and FOF_ALLOWUNDO. These parameters are used when deleting files from the folder views. A basic Trash virtual folder is also implemented. In the UI it's called Trash and not Recycle Bin (as in Windows) as that's how it is called under the Unix shells.

Interoperability

KDE starting from 3.4 implements the freedesktop.org standard. The files trashed by wine can be seen in the KDE Trash folder (however a manual refresh with F5 is required) and can be destroyed/restored from the KDE shell. Gnome doesn't implement the freedesktop standard however in some unspecified future should (http://lists.freedesktop.org/archives/xdg/2006-June/008209.html)

Not implemented yet

  • Support for other filesystems - the current code can only trash items from the filesystem that contains the home trash. The items from other filesystems can be only deleted (under construction)
  • Fallback to manual copy if rename(2) failed. I've read the rename(2) may fail e.g. if one NFS export spans multiple filesystems on the server. However this is probably rare and manually preserving all the attributes and on some systems ACLs, EAs etc. may be hard and system-dependent
  • Support to restore files, destroy files and empty the trash from the Trash virtual folder. This may be helpful for Gnome users that can't do that from their Linux shell. However that would require also to write a shell browser - the Open File dialog supports only filesystem objects while winefile isn't a good browser for a virtual folder.

Trash (last edited 2008-05-03 02:13:21 by nathan.n)