⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.133
Server IP:
185.119.109.197
Server:
Linux managedhosting.chostar.me 5.15.0-160-generic #170-Ubuntu SMP Wed Oct 1 10:06:56 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.1.33
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
ri
/
3.0.0
/
system
/
Dir
/
Edit File: glob-c.ri
U:RDoc::AnyMethod[iI" glob:ETI"Dir::glob;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Verbatim; [I"^Dir.glob( pattern, [flags], [base: path] [, sort: true] ) -> array ;TI"\Dir.glob( pattern, [flags], [base: path] [, sort: true] ) { |filename| block } -> nil ;T:@format0o:RDoc::Markup::Paragraph; [ I"IExpands +pattern+, which is a pattern string or an Array of pattern ;TI"Fstrings, and returns an array containing the matching filenames. ;TI"KIf a block is given, calls the block once for each matching filename, ;TI"6passing the filename as a parameter to the block.;To:RDoc::Markup::BlankLine o;; [ I"KThe optional +base+ keyword argument specifies the base directory for ;TI"Ointerpreting relative pathnames instead of the current working directory. ;TI"JAs the results are not prefixed with the base directory name in this ;TI"Mcase, you will need to prepend the base directory name if you want real ;TI"paths.;T@o;; [ I"NThe results which matched single wildcard or character set are sorted in ;TI"Jbinary ascending order, unless false is given as the optional +sort+ ;TI"Lkeyword argument. The order of an Array of pattern strings and braces ;TI"are preserved.;T@o;; [I"INote that the pattern is not a regexp, it's closer to a shell glob. ;TI"ASee File::fnmatch for the meaning of the +flags+ parameter. ;TI"MCase sensitivity depends on your system (File::FNM_CASEFOLD is ignored).;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"3Equivalent to <code>/ .* /mx</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"HMatches directories recursively if followed by <code>/</code>. If ;TI"Lthis path segment contains any other characters, it is the same as the ;TI"usual <code>*</code>.;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; ; [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"EDir.glob(["*.rb", "*.h"]) #=> ["main.rb", "config.h"] ;TI" ;TI"9Dir.glob("**/*.rb") #=> ["main.rb", ;TI"= # "lib/song.rb", ;TI"E # "lib/song/karaoke.rb"] ;TI" ;TI"9Dir.glob("**/*.rb", base: "lib") #=> ["song.rb", ;TI"A # "song/karaoke.rb"] ;TI" ;TI"5Dir.glob("**/lib") #=> ["lib"] ;TI" ;TI"=Dir.glob("**/lib/**/*.rb") #=> ["lib/song.rb", ;TI"E # "lib/song/karaoke.rb"] ;TI" ;TI"<Dir.glob("**/lib/*.rb") #=> ["lib/song.rb"];T;0: @fileI"dir.rb;T:0@omit_headings_from_table_of_contents_below000[ I"@(pattern, _flags = 0, flags: _flags, base: nil, sort: true);T@�FI"Dir;TcRDoc::NormalClass00
Simpan