--- !ruby/object:RI::MethodDescription 
aliases: []

block_params: 
comment: 
- !ruby/struct:SM::Flow::P 
  body: "Returns true if <em>path</em> matches against <em>pattern</em> The pattern is not a regular expression; instead it follows rules similar to shell filename globbing. It may contain the following metacharacters:"
- !ruby/object:SM::Flow::LIST 
  contents: 
  - !ruby/struct:SM::Flow::LI 
    label: "<code>*</code>:"
    body: Matches any file. Can be restricted by other values in the glob. <tt>*</tt> will match all files; <tt>c*</tt> will match all files beginning with <tt>c</tt>; <tt>*c</tt> will match all files ending with <tt>c</tt>; and <b><tt>c</tt></b> will match all files that have <tt>c</tt> in them (including at the beginning or end). Equivalent to <tt>/ .* /x</tt> in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>?</code>:"
    body: Matches any one character. Equivalent to <tt>/.{1}/</tt> in regexp.
  - !ruby/struct:SM::Flow::LI 
    label: "<code>[set]</code>:"
    body: Matches any one character in <tt>set</tt>. Behaves exactly like character sets in Regexp, including set negation (<tt>[^a-z]</tt>).
  - !ruby/struct:SM::Flow::LI 
    label: "<code>\\</code>:"
    body: Escapes the next metacharacter.
  type: :NOTE
- !ruby/struct:SM::Flow::P 
  body: <em>flags</em> is a bitwise OR of the <tt>FNM_xxx</tt> parameters. The same glob pattern and flags are used by <tt>Dir::glob</tt>.
- !ruby/struct:SM::Flow::VERB 
  body: "   File.fnmatch('cat',       'cat')        #=&gt; true\n   File.fnmatch('cat',       'category')   #=&gt; false\n   File.fnmatch('c{at,ub}s', 'cats')       #=&gt; false\n   File.fnmatch('c{at,ub}s', 'cubs')       #=&gt; false\n   File.fnmatch('c{at,ub}s', 'cat')        #=&gt; false\n\n   File.fnmatch('c?t',    'cat')                       #=&gt; true\n   File.fnmatch('c\\?t',   'cat')                       #=&gt; false\n   File.fnmatch('c??t',   'cat')                       #=&gt; false\n   File.fnmatch('c*',     'cats')                      #=&gt; true\n   File.fnmatch('c/ * FIXME * /t', 'c/a/b/c/t')                 #=&gt; true\n   File.fnmatch('c*t',    'cat')                       #=&gt; true\n   File.fnmatch('c\\at',   'cat')                       #=&gt; true\n   File.fnmatch('c\\at',   'cat', File::FNM_NOESCAPE)   #=&gt; false\n   File.fnmatch('a?b',    'a/b')                       #=&gt; true\n   File.fnmatch('a?b',    'a/b', File::FNM_PATHNAME)   #=&gt; false\n\n   File.fnmatch('*',   '.profile')                            #=&gt; false\n   File.fnmatch('*',   '.profile', File::FNM_DOTMATCH)        #=&gt; true\n   File.fnmatch('*',   'dave/.profile')                       #=&gt; true\n   File.fnmatch('*',   'dave/.profile', File::FNM_DOTMATCH)   #=&gt; true\n   File.fnmatch('*',   'dave/.profile', File::FNM_PATHNAME)   #=&gt; false\n   File.fnmatch('* / FIXME *', 'dave/.profile', File::FNM_PATHNAME)   #=&gt; false\n   STRICT = File::FNM_PATHNAME | File::FNM_DOTMATCH\n   File.fnmatch('* / FIXME *', 'dave/.profile', STRICT)               #=&gt; true\n"
full_name: File::fnmatch
is_singleton: true
name: fnmatch
params: |
  File.fnmatch( pattern, path, [flags] ) => (true or false)
  File.fnmatch?( pattern, path, [flags] ) => (true or false)

visibility: public
