4

Note: This has already been posted on Ruby Forum some weeks ago. I'm crossposting it here, because I didn't get any response so far

Dir.glob provides an optional parameter, usually referred as 'flags'. Where can I find a documentation about what flags are possible?

The Ruby 2.0 docs just say that the flags are "the same as used in File.fnmatch".

Looking up the documentation of File.fnmatch, I only find the explanation that these are the "FNM_xxx" flags, which can be or'ed together. I could however find no documentation about what FNM_xxx flags exist.

Where is this described?

user1934428
  • 19,864
  • 7
  • 42
  • 87

1 Answers1

3

It's actually defined inside File::Constants, and thereby documented under the same.

Look it up with ri :

ri File::Constants

Or read the html doc : Module: File::Constants (Ruby 2.2.2).

limekin
  • 1,934
  • 1
  • 12
  • 15