End of Life Ruby 3.1 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.1.3/ext/pathname/lib/pathname.rb, line 592
def rmtree
# The name "rmtree" is borrowed from File::Path of Perl.
# File::Path provides "mkpath" and "rmtree".
FileUtils.rm_r(@path)
nil
end
Recursively deletes a directory, including all directories beneath it.
See FileUtils.rm_r