End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
FileUtils.remove_file
remove_file(path, force = false)
lib/fileutils.rb
View on GitHub ↗
# File tmp/rubies/ruby-3.1.3/lib/fileutils.rb, line 787
def remove_file(path, force = false)
Entry_.new(path).remove_file
rescue
raise unless force
end
Removes a file path. This method ignores StandardError if force is true.
See also
#remove_file
.remove_entry_secure
.rm
.remove_entry
also in
4.1 · 4.0 · 3.4 · 3.3 · 3.2 · 3.0