Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
opt
/
alt
/
ruby21
/
share
/
ri
/
2.1.0
/
system
/
Dir
/
//opt/alt/ruby21/share/ri/2.1.0/system/Dir/glob-c.ri
U:RDoc::AnyMethod[iI" glob:ETI"Dir::glob;TT:publico:RDoc::Markup::Document:@parts[ o:RDoc::Markup::Paragraph; [I"OExpands +pattern+, which is an Array of patterns or a pattern String, and ;TI"Ireturns the results as +matches+ or as arguments given to the block.;To:RDoc::Markup::BlankLine o; ; [ I"ONote that this pattern is not a regexp, it's closer to a shell glob. See ;TI"MFile::fnmatch for the meaning of the +flags+ parameter. Note that case ;TI"Osensitivity depends on your system (so File::FNM_CASEFOLD is ignored), as ;TI"6does the order in which the results are returned.;T@o:RDoc::Markup::List: @type: NOTE:@items[o:RDoc::Markup::ListItem:@label[I"<code>*</code>;T; [ o; ; [I"FMatches any file. Can be restricted by other values in the glob. ;TI"2Equivalent to <code>/ .* /x</code> in regexp.;T@o;; ;;[ o;;[I"<code>*</code>;T; [o; ; [I"Matches all files;To;;[I"<code>c*</code>;T; [o; ; [I"4Matches all files beginning with <code>c</code>;To;;[I"<code>*c</code>;T; [o; ; [I"1Matches all files ending with <code>c</code>;To;;[I"<code>\*c\*</code>;T; [o; ; [I"6Match all files that have <code>c</code> in them ;TI")(including at the beginning or end).;T@o; ; [I"LNote, this will not match Unix-like hidden files (dotfiles). In order ;TI"=to include those in the match results, you must use the ;TI"EFile::FNM_DOTMATCH flag or something like <code>"{*,.*}"</code>.;T@o;;[I"<code>**</code>;T; [o; ; [I"%Matches directories recursively.;T@o;;[I"<code>?</code>;T; [o; ; [I"LMatches any one character. Equivalent to <code>/.{1}/</code> in regexp.;T@o;;[I"<code>[set]</code>;T; [o; ; [I"NMatches any one character in +set+. Behaves exactly like character sets ;TI"=in Regexp, including set negation (<code>[^a-z]</code>).;T@o;;[I"<code>{p,q}</code>;T; [ o; ; [I"FMatches either literal <code>p</code> or literal <code>q</code>. ;TI"1Equivalent to pattern alternation in regexp.;T@o; ; [I"LMatching literals may be more than one character in length. More than ;TI"#two literals may be specified.;T@o;;[I"<code> \\ </code>;T; [ o; ; [I"$Escapes the next metacharacter.;T@o; ; [I"KNote that this means you cannot use backslash on windows as part of a ;TI"Aglob, i.e. <code>Dir["c:\\foo*"]</code> will not work, use ;TI")<code>Dir["c:/foo*"]</code> instead.;T@o; ; [I"Examples:;T@o:RDoc::Markup::Verbatim; [I":Dir["config.?"] #=> ["config.h"] ;TI":Dir.glob("config.?") #=> ["config.h"] ;TI"9Dir.glob("*.[a-z][a-z]") #=> ["main.rb"] ;TI":Dir.glob("*.[^r]*") #=> ["config.h"] ;TI"EDir.glob("*.{rb,h}") #=> ["main.rb", "config.h"] ;TI"EDir.glob("*") #=> ["config.h", "main.rb"] ;TI"PDir.glob("*", File::FNM_DOTMATCH) #=> [".", "..", "config.h", "main.rb"] ;TI" ;TI"'rbfiles = File.join("**", "*.rb") ;TI"9Dir.glob(rbfiles) #=> ["main.rb", ;TI"= # "lib/song.rb", ;TI"E # "lib/song/karaoke.rb"] ;TI"&libdirs = File.join("**", "lib") ;TI"5Dir.glob(libdirs) #=> ["lib"] ;TI" ;TI"7librbfiles = File.join("**", "lib", "**", "*.rb") ;TI"=Dir.glob(librbfiles) #=> ["lib/song.rb", ;TI"E # "lib/song/karaoke.rb"] ;TI" ;TI"1librbfiles = File.join("**", "lib", "*.rb") ;TI"<Dir.glob(librbfiles) #=> ["lib/song.rb"];T:@format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"gDir.glob( pattern, [flags] ) -> matches Dir.glob( pattern, [flags] ) { |filename| block } -> nil ;T0[ I"(p1, p2 = v2);T@�FI"Dir;TcRDoc::NormalClass00