End of Life Ruby 3.2 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
FileUtils.rm_rf
rm_rf(list, noop: nil, verbose: nil, secure: nil)
lib/fileutils.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.2.0/lib/fileutils.rb, line 1346
def rm_rf(list, noop: nil, verbose: nil, secure: nil)
rm_r list, force: true, noop: noop, verbose: verbose, secure: secure
end
Equivalent to:
Example
FileUtils.rm_r(list, force: true, **kwargs)
Argument list or its elements should be interpretable as paths.
May cause a local vulnerability if not called with keyword argument secure: true; see Avoiding the TOCTTOU Vulnerability.
See FileUtils.rm_r for keyword arguments.
FileUtils.rmtree is an alias for FileUtils.rm_rf.
Related: methods for deleting.