End of Life Ruby 3.0 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
instance method
Pathname#rmtree
rmtree
ext/pathname/lib/pathname.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.0.5/ext/pathname/lib/pathname.rb, line 591
def rmtree
# The name "rmtree" is borrowed from File::Path of Perl.
# File::Path provides "mkpath" and "rmtree".
require 'fileutils'
FileUtils.rm_r(@path)
nil
end
Recursively deletes a directory, including all directories beneath it.
See FileUtils.rm_r