Trash mechanism

David Faure dfaure at trolltech.com
Sat Aug 28 23:35:42 EEST 2004


On Saturday 28 August 2004 21:12, C. Gatzemeier wrote:
> Am Friday 27 August 2004 18:21 schrieb David Faure:
> 
> > Given that we need additional info in the file (the full path to the
> > initial file) I don't see the point of moving the date of deletion into the
> > filename of the info file, if we still need an info file anyway.
> 
> hmm, thought with the date "attached" we could spare us the separate meta info 
> file tree if a file is moved to a trash subdirectory that corresponds to its 
> original location.

This doesn't work. Without meta info, if you delete A/B and later on A itself,
and then you restore A, it's going to come up with a strange "A/B[dateofdeletion]" 
file in it, since that file was actually there in the trash. Plus, listing the deleted files
and dirs requires a recursive search and heuristics based on the filename (!).

With meta info, we have in the info/ dir exactly one info file per deletion operation,
so we can restore exactly the right thing (the contents of A as it was when deleting it).

-- 
David Faure, faure at kde.org, sponsored by Trolltech to work on KDE,
Konqueror (http://www.konqueror.org), and KOffice (http://www.koffice.org).



More information about the xdg mailing list