Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

class method

FileUtils.have_option?

have_option?(mid, opt)

Returns true if method mid accepts the given option opt, false otherwise; the arguments may be strings or symbols:

Example
FileUtils.have_option?(:chmod, :noop) # => true
FileUtils.have_option?('chmod', 'secure') # => false
See also .getwd .identical? .cp_r .install also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0