<table><tr><td style="">dfaure added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D24773">View Revision</a></tr></table><br /><div><div><p>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.</p>
<p>My suggestion would be to add a UDS_RECURSIVE_SIZE instead.<br />
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.<br />
One solution would be to use the "details" metadata for this.</p>
<ul class="remarkup-list">
<li class="remarkup-list-item">0 (as set by DeleteJob) means bare minimum (filename and type).</li>
<li class="remarkup-list-item">1 isn't used anymore, but it adds uid, gid, atime, mtime, btime</li>
<li class="remarkup-list-item">2 is the default, which is the above plus ACL data</li>
<li class="remarkup-list-item">3 requests in addition the device and inode number (from kio_file), so that DirectorySizeJob can check for hardlinks</li>
<li class="remarkup-list-item">we could add that 4 means "I want UDS_RECURSIVE_SIZE too".</li>
</ul>
<p>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.</p>
<p>Sample code, like in kio_file and kio_ftp:</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">const QString sDetails = metaData(QLatin1String("details"));
const int details = sDetails.isEmpty() ? 2 : sDetails.toInt();</pre></div></div></div><br /><div><strong>REPOSITORY</strong><div><div>R241 KIO</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D24773">https://phabricator.kde.org/D24773</a></div></div><br /><div><strong>To: </strong>meven, Frameworks, ngraham, elvisangelaccio, dfaure<br /><strong>Cc: </strong>kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>