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

Reply via email to