[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: Enhanced Trash functionality
From:       "Leander Hanwald (LH)" <shockflash () web ! de>
Date:       2003-11-24 10:11:41
[Download RAW message or body]

Hi

I think is is a possible solution:

If you delete a directory, you should only move it with all data inside to 
~/.trash, and rename it to something like "myslammfolder_xyz", where "_xyz" 
is a code to make the name unique. Additional, you have a xml file what 
incluse addionall informations like original path+ name, programm that 
deleted and delete date. The XML File could be named like 
"myslammfolder_xyz.xml"

For files, you can make folders like "FILENAME_filexyz" or something, if you 
delete multiple files at one time, the system can put them into one 
directory.
Also here, you should create a xml file with the same informations said above. 

If someone looks in the trash, you must simply get the list of Files inside 
and read the xml files. You can also put additional informations to xml file 
so you only need to read them, not to look into the directories. 
XML parsers are easy to find on a Linux system :)

Am Montag, 24. November 2003 10:44 schrieb Jonathan Hunt:
>[Interface]
>
> Does this sound like a agreeable interface. The only other library besides
> Std C++ and STL I think I would make it dependable on is some common
> database library for keeping track of the files. I'd love to hear any
> suggestions about what I would use here (I'm looking for something small,
> common or at least portable that can handle at least a moderately sized DB
> (I never delete my trash so I want something that can easily scale to >
> 1000 files etc.), stable. Most common solutions seem to need a daemon
> running (eg MySQL) which is something I'd rather not bother with in the
> interests of easy setup and self-containment etc. I'd rather not write
> something like this myself just cause it seems like reinventing the wheel
> but it is an option (just a flat file that gets compacted occasionally).
> Suggestions/advice welcome.

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic