https://redmine.ruby-lang.org/
https://redmine.ruby-lang.org/favicon.ico?1711330511
2017-11-15T06:43:17Z
Ruby Issue Tracking System
Ruby master - Feature #14109: FileUtils: Use Dir.children instead of Dir.entries
https://redmine.ruby-lang.org/issues/14109?journal_id=67815
2017-11-15T06:43:17Z
esparta (Espartaco Palma)
<ul><li><strong>Description</strong> updated (<a title="View differences" href="/journals/67815/diff?detail_id=46813">diff</a>)</li></ul>
Ruby master - Feature #14109: FileUtils: Use Dir.children instead of Dir.entries
https://redmine.ruby-lang.org/issues/14109?journal_id=74794
2018-11-07T15:55:18Z
hsbt (Hiroshi SHIBATA)
hsbt@ruby-lang.org
<ul><li><strong>Status</strong> changed from <i>Open</i> to <i>Closed</i></li></ul><p>Applied in changeset trunk|r65610.</p>
<hr>
<p>Dir.children is available since Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Dir.entries and Dir.foreach without [".", ".."] (Closed)" href="https://redmine.ruby-lang.org/issues/11302">#11302</a>. FileUtils uses<br>
Dir.each on an internal method encapsulated on a private class<br>
<code>Entry_#entry</code>, having no '.' neither '..' entries would make<br>
now superfluous a chained reject filtering.</p>
<p>This change can improve the performance of these FileUtils<br>
methods when the provided path covers thousands of files or<br>
directories:</p>
<ul>
<li>chmod_R</li>
<li>chown_R</li>
<li>remove_entry</li>
<li>remove_entry_secure</li>
<li>rm_r</li>
<li>remove_dir</li>
<li>copy_entry</li>
</ul>
<p>Related: Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: Find.find -> Use Dir.children instead of Dir.entries (Closed)" href="https://redmine.ruby-lang.org/issues/13896">#13896</a> <a href="https://bugs.ruby-lang.org/issues/13896" class="external">https://bugs.ruby-lang.org/issues/13896</a></p>
<p>[Feature <a class="issue tracker-2 status-5 priority-4 priority-default closed" title="Feature: FileUtils: Use Dir.children instead of Dir.entries (Closed)" href="https://redmine.ruby-lang.org/issues/14109">#14109</a>][Fix GH-1754]</p>
<p>Co-Authored-By: esparta <a href="mailto:esparta@gmail.com" class="email">esparta@gmail.com</a></p>