This commit is contained in:
Hiroshi SHIBATA 2022-05-20 18:36:01 +09:00
parent e3434118c2
commit c83ec3aba7
No known key found for this signature in database
GPG Key ID: F9CF13417264FAC2
1 changed files with 4 additions and 3 deletions

View File

@ -588,11 +588,12 @@ class Pathname # * FileUtils *
# Recursively deletes a directory, including all directories beneath it. # Recursively deletes a directory, including all directories beneath it.
# #
# See FileUtils.rm_r # See FileUtils.rm_rf
def rmtree def rmtree(noop: nil, verbose: nil, secure: nil)
# The name "rmtree" is borrowed from File::Path of Perl. # The name "rmtree" is borrowed from File::Path of Perl.
# File::Path provides "mkpath" and "rmtree". # File::Path provides "mkpath" and "rmtree".
FileUtils.rm_r(@path) require 'fileutils'
FileUtils.rm_rf(@path, noop: noop, verbose: verbose, secure: secure)
nil nil
end end
end end