Trash kded module
Sebastian TrĂ¼g
trueg at kde.org
Wed Aug 12 12:29:20 BST 2009
In the trash kio slave's trashimpl.h David writes that it could be converted
into a kded module. I am thinking about that for the following reason.
The Nepomuk search kio slave does also return results from the trash and I
need a way to filter them. One way would be to check the path and see if they
are children of one of the trash paths.
(The simplest way of course would be to add a field in nepomuk but that would
not handle legacy files. And even for catching up with those I would need the
trash path.)
So it means that I would have to copy code from trashimpl or rely on a new
kded module to answer the question for me.
Is a trash kded module something that could be usable to others, too? And if
so, what would the API look like?
I am thinking of something like:
/// @returns the new path of the file
QString moveToTrash(QString path)
bool restoreFromLocalPath( QString localPath );
bool restoreFromTrashPath( QString path );
bool restoreFromTrashName( QString name );
/// @return all trash folders in the system including removable storages
QStringList allTrashFolders();
/// @return the trash folders for the storage with solid id @p uuid
QStringList trashFoldersForStorage( QString uuid );
void emptyTrash();
Input welcome.
Cheers,
Sebastian
More information about the kde-core-devel
mailing list