D24773: kio_trash: Add size, modification, access and create date for trash:/

Méven Car noreply at phabricator.kde.org
Mon Oct 21 08:27:04 BST 2019


meven marked 3 inline comments as done.
meven added inline comments.

INLINE COMMENTS

> dfaure wrote in trashimpl.cpp:1088
> This method could be const, right?

No becauseof the call to `list()` that cannot be const.

> dfaure wrote in trashimpl.cpp:1104
> This looks very slow. We have a cache for the size usage. See `TrashImpl::trashSpaceInfo`.
> 
> But anyway, we never return recursive directory size in the UDS_SIZE field, in no ioslave.
> If someone wants to know the size of a directory, they can use the properties dialog, which has a calculate button.

I missed the feature of trashSpaceInfo, thank you for pointing it out.

We need to add the UDS_SIZE field here : this is a missing feature for a special common use case : Finding out what amount of space is occupied by the trashed files ?
The trash size should be easy to find out for users. Plus we have a cache file to get this information cheaply.

UDS_SIZE may not be used that way currently but it is semantically correct nonetheless.
In most other cases directory size calculation is not used because it is too resource intensive but here we have the value pre-computed.

And by the way the trash:/ has not `Properties` entry in its context menu, so it is not even possible to get the trash size currently.

REPOSITORY
  R241 KIO

REVISION DETAIL
  https://phabricator.kde.org/D24773

To: meven, #frameworks, ngraham, elvisangelaccio, dfaure
Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20191021/a401cbbe/attachment.html>


More information about the Kde-frameworks-devel mailing list