mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Merge https://github.com/ruby/pathname/pull/8 for pathname
This commit is contained in:
parent
e3434118c2
commit
c83ec3aba7
1 changed files with 4 additions and 3 deletions
|
@ -588,11 +588,12 @@ class Pathname # * FileUtils *
|
|||
|
||||
# Recursively deletes a directory, including all directories beneath it.
|
||||
#
|
||||
# See FileUtils.rm_r
|
||||
def rmtree
|
||||
# See FileUtils.rm_rf
|
||||
def rmtree(noop: nil, verbose: nil, secure: nil)
|
||||
# The name "rmtree" is borrowed from File::Path of Perl.
|
||||
# File::Path provides "mkpath" and "rmtree".
|
||||
FileUtils.rm_r(@path)
|
||||
require 'fileutils'
|
||||
FileUtils.rm_rf(@path, noop: noop, verbose: verbose, secure: secure)
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue