Skip to content

End of Life Ruby 3.2 has reached end of life and gets no more fixes. 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.3 · 3.1 · 3.0