Maintenance Ruby 3.4 gets fixes, but no new features. Switch to Ruby 4.0 →
instance method
FileUtils#remove_dir
(::FileUtils::path path, ?::boolish force) -> void
remove_dir(path, force = false)
lib/fileutils.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.4.1/lib/fileutils.rb, line 1493
def remove_dir(path, force = false)
remove_entry path, force # FIXME?? check if it is a directory
end
Recursively removes the directory entry given by path, which should be the entry for a regular file, a symbolic link, or a directory.
Argument path should be interpretable as a path.
Optional argument force specifies whether to ignore raised exceptions of StandardError and its descendants.
Related: methods for deleting.