Merge https://github.com/ruby/pathname/pull/8 for pathname
This commit is contained in:
parent
e3434118c2
commit
c83ec3aba7
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue