Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →
class method
FileUtils.safe_unlink
(::FileUtils::pathlist list, ?noop: ::boolish, ?verbose: ::boolish) -> void
safe_unlink(list, noop: nil, verbose: nil)
lib/fileutils.rb
View on GitHub ↗
# File tmp/rubies/ruby-4.1.0-preview1/lib/fileutils.rb, line 1267
def rm_f(list, noop: nil, verbose: nil)
rm list, force: true, noop: noop, verbose: verbose
end
Alias of .rm_f
Equivalent to:
Example
FileUtils.rm(list, force: true, **kwargs)
Argument list (a single path or an array of paths) should be interpretable as paths.
See FileUtils.rm for keyword arguments.
Related: methods for deleting.