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

David Faure noreply at phabricator.kde.org
Sat Oct 26 17:45:51 BST 2019


dfaure added a comment.


  You can do whatever you want in the GUI -- I'll happily step out of that part of the discussion --, as long as you don't abuse UDS_SIZE for what it was not meant for, thus creating an ambiguous meaning for it.
  
  My suggestion would be to add a UDS_RECURSIVE_SIZE instead.
  The problem with that, however, is that the kioslave can't know if the application actually wants the information. So in most cases we would be wasting a lot of time for nothing -- even here it's not fully for free.
  One solution would be to use the "details" metadata for this.
  
  - 0 (as set by DeleteJob) means bare minimum (filename and type).
  - 1 isn't used anymore, but it adds uid, gid, atime, mtime, btime
  - 2 is the default, which is the above plus ACL data
  - 3 requests in addition the device and inode number (from kio_file), so that DirectorySizeJob can check for hardlinks
  - we could add that 4 means "I want UDS_RECURSIVE_SIZE too".
  
  I don't know if this will be useful in any other kioslave, but at least here it would allow skipping this stuff when not needed.
  
  Sample code, like in kio_file and kio_ftp:
  
    const QString sDetails = metaData(QLatin1String("details"));
    const int details = sDetails.isEmpty() ? 2 : sDetails.toInt();

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/20191026/6497e120/attachment-0001.html>


More information about the Kde-frameworks-devel mailing list