Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
Pathname#rmtree
() -> self
rmtree(noop: nil, verbose: nil, secure: nil)
ext/pathname/lib/pathname.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/ext/pathname/lib/pathname.rb, line 597
def rmtree(noop: nil, verbose: nil, secure: nil)
# The name "rmtree" is borrowed from File::Path of Perl.
# File::Path provides "mkpath" and "rmtree".
require 'fileutils'
FileUtils.rm_rf(@path, noop: noop, verbose: verbose, secure: secure)
self
end
Recursively deletes a directory, including all directories beneath it.
See FileUtils.rm_rf