<table><tr><td style="">feverfew edited the summary of this revision. <a href="https://phabricator.kde.org/transactions/detail/PHID-XACT-DREV-u22zxv6fnzymbdg/">(Show Details)</a>
</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/D26148">View Revision</a></tr></table><br /><div><strong>CHANGES TO REVISION SUMMARY</strong><div><div style="white-space: pre-wrap; color: #74777D;"><div style="padding: 8px 0;">...</div>It also implements this function in the file slave.<span style="padding: 0 2px; color: #333333; background: rgba(151, 234, 151, .6);"><br />
<br />
Currently within the `FileJob` class there is no native way to truncate an<br />
open file. To achieve truncation, one has to do a `FileJob->read()` until the<br />
truncation point and then do a `KIO::put()` to truncate accordingly. This brings<br />
two undesirable issues:<br />
1. Incredibly wasteful and non-performant.<br />
2. One has to do IO outside of the FileJob interface. One has to make sure that<br />
during the `KIO::put()`, there are no open file descriptors (created via<br />
`KIO::open()`), as they would be invalidated by the `KIO::put()`.<br />
<br />
Adding native supports allows cleaner, more performant code and means that<br />
the `FileJob` class is functionally complete in providing random-access I/O.</span></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/D26148">https://phabricator.kde.org/D26148</a></div></div><br /><div><strong>To: </strong>feverfew, fvogt, dfaure, sitter<br /><strong>Cc: </strong>apol, ngraham, sitter, dfaure, kde-frameworks-devel, fvogt, LeGast00n, GB_2, michaelh, bruns<br /></div>