diff --git a/lib/pathname.rb b/lib/pathname.rb index 3799d58..41e5c17 100644 --- a/lib/pathname.rb +++ b/lib/pathname.rb @@ -588,11 +588,12 @@ def mkpath(mode: nil) # 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