Re: Trash system



#if Pavel Cisler
> We use multiple Trash directories on all the partitions that the user
> tries to delete items and present them as a unified virtual directory in
> Nautilus.

Quite nice. The user isn't going to like multiple trash dirs :)

> We have quite an elaborate heuristic that picks the location of the
> actual physical trash directories on the different partitions. 
> 
> While it is really easy to place a Trash directory into your home
> directory for trashed items from the same partition (we use ~/.Trash),
> it's harder to pick a good place on the other ext2, etc. disks because
> there is no standard. 

Hmm. Perhaps then it would be better to copy to the local partition ?
I know it's not ideal, but then it's much more likely to actually work
than trying to guess a place where the user can write on non-home
partition. You'd have to warn the user if they're going to try and
put a 3G file in their trash dir when the home partition only has
2G free, of course, but I think that's better than trying to explain
to them why they can't put something in trash because it's on another
partition and you can't find anywhere to store it.

> Besides that, I was going to add more support in to recognize Windows
> and maybe even Mac Trash, either should be easy because on those systems
> Trash is in a well known place.

Now _that_ is a good idea. Merging the UNIX, Windows and Mac trash
directories from the user's point of view would be great IMO, but I
really don't think having multiple trash dirs on multiple partitions
will work in UNIX.

> As far as metadata for Trash, we are planning to store the original item
> locations but have not implemented the feature yet so it would be really
> easy to adopt any solution that you may already have. Any other metadata
> besides the original location?

* Date/time of deletion.

* A serial number - so if you delete many files at one (rm -rf :) then
  all the files get the same serial number and undo is easier. Perhaps
  a list of files can be stored in one place when you do a multiple
  deletion, so you don't have to do a recursive search and inodes are
  saved.

* Original [ma]time - you'll need to know this if you want to restore with
  the same timestamp(s).

* Other stuff I'm sure.

Rik




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]