Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FileUtils : Use Dir.children instead of Dir.entries #1754

Closed
wants to merge 1 commit into from

Commits on Nov 15, 2017

  1. FileUtils : Use Dir.children instead of Dir.entries

    Feature #14109
    
    Dir.children is available since Feature #11302. FileUtils uses
    Dir.each on an internal method encapsulated on a private class
    `Entry_#entry`, having no '.' neither '..' entries would make
    now superfluous a chained reject filtering.
    
    This change can improve the performance of these FileUtils
    methods when the provided path covers thousands of files or
    directories:
    
    - chmod_R
    - chown_R
    - remove_entry
    - remove_entry_secure
    - rm_r
    - remove_dir
    - copy_entry
    
    Related: Feature #13896 https://bugs.ruby-lang.org/issues/13896
    esparta committed Nov 15, 2017
    Copy the full SHA
    ff151dd View commit details
    Browse the repository at this point in the history