ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- PK۰]IT** entries-c.rinu[U:RDoc::AnyMethod[iI" entries:ETI"Dir::entries;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"CReturns an array containing all of the filenames in the given ;TI"Ddirectory. Will raise a SystemCallError if the named directory ;TI"doesn't exist.;To:RDoc::Markup::BlankLineo; ; [I"QThe optional encoding keyword argument specifies the encoding of the ;TI"Bdirectory. If not specified, the filesystem encoding is used.;T@o:RDoc::Markup::Verbatim; [I"DDir.entries("testdir") #=> [".", "..", "config.h", "main.rb"];T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"cDir.entries( dirname ) -> array Dir.entries( dirname, encoding: enc ) -> array ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK۰]1K33each_child-i.rinu[U:RDoc::AnyMethod[iI"each_child:ETI"Dir#each_child;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"DCalls the block once for each entry except for "." and ".." in ;TI"Gthis directory, passing the filename of each entry as a parameter ;TI"to the block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"d = Dir.new("testdir") ;TI"*d.each_child {|x| puts "Got #{x}" } ;T: @format0o; ; [I"produces:;T@o; ; [I"Got config.h ;TI"Got main.rb;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"idir.each_child {| filename | block } -> dir dir.each_child -> an_enumerator ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]Шk to_path-i.rinu[U:RDoc::AnyMethod[iI" to_path:ETI"Dir#to_path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the path parameter passed to dir's constructor.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("..") ;TI"d.path #=> "..";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dir;TcRDoc::NormalClass0[@FI" path;TPK۰]H home-c.rinu[U:RDoc::AnyMethod[iI" home:ETI"Dir::home;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"FReturns the home directory of the current user or the named user ;TI"if given.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"@Dir.home() -> "/home/me" Dir.home("root") -> "/root" ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK۰]DD inspect-i.rinu[U:RDoc::AnyMethod[iI" inspect:ETI"Dir#inspect;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Return a string describing this Dir object.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.inspect -> string ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]ײ, delete-c.rinu[U:RDoc::AnyMethod[iI" delete:ETI"Dir::delete;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDeletes the named directory. Raises a subclass of SystemCallError ;TI""if the directory isn't empty.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"RDir.delete( string ) -> 0 Dir.rmdir( string ) -> 0 Dir.unlink( string ) -> 0 ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK۰]_ʳ %5b%5d-c.rinu[U:RDoc::AnyMethod[iI"[]:ETI" Dir::[];TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"Equivalent to calling ;TI"@Dir.glob([string,...], 0).;T: @fileI" dir.rb;T:0@omit_headings_from_table_of_contents_below0I"IDir[ string [, string ...] [, base: path] [, sort: true] ] -> array ;T0[I"#(*args, base: nil, sort: true);T@FI"Dir;TcRDoc::NormalClass00PK۰])( glob-c.rinu[U:RDoc::AnyMethod[iI" glob:ETI"Dir::glob;TT: privateo:RDoc::Markup::Document: @parts[o: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::BlankLineo; ; [ 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"Lbinary 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"OCase sensitivity depends on your system (+File::FNM_CASEFOLD+ is ignored).;T@o:RDoc::Markup::List: @type: NOTE: @items[ o:RDoc::Markup::ListItem: @label[I"*;T; [ o; ; [I"FMatches any file. Can be restricted by other values in the glob. ;TI"1Equivalent to /.*/mx in regexp.;T@o; ; ;;[ o;;[I"*;T; [o; ; [I"Matches all files;To;;[I"c*;T; [o; ; [I"4Matches all files beginning with c;To;;[I"*c;T; [o; ; [I"1Matches all files ending with c;To;;[I"\*c\*;T; [o; ; [I"6Match all files that have c 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 "{*,.*}".;T@o;;[I"**;T; [o; ; [I"HMatches directories recursively if followed by /. If ;TI"Lthis path segment contains any other characters, it is the same as the ;TI"usual *.;T@o;;[I"?;T; [o; ; [I"LMatches any one character. Equivalent to /.{1}/ in regexp.;T@o;;[I"[set];T; [o; ; [I"NMatches any one character in +set+. Behaves exactly like character sets ;TI"=in Regexp, including set negation ([^a-z]).;T@o;;[I"{p,q};T; [ o; ; [I"FMatches either literal p or literal q. ;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"\\;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. Dir["c:\\foo*"] will not work, use ;TI")Dir["c:/foo*"] 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"JDir.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" ["lib/song.rb"];T: @format0: @fileI" dir.rb;T:0@omit_headings_from_table_of_contents_below0I"Dir.glob( pattern, [flags], [base: path] [, sort: true] ) -> array Dir.glob( pattern, [flags], [base: path] [, sort: true] ) { |filename| block } -> nil ;T0[I"@(pattern, _flags = 0, flags: _flags, base: nil, sort: true);T@FI"Dir;TcRDoc::NormalClass00PK۰]B>L. . mktmpdir-c.rinu[U:RDoc::AnyMethod[iI" mktmpdir:ETI"Dir::mktmpdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"0Dir.mktmpdir creates a temporary directory.;To:RDoc::Markup::BlankLineo; ; [I"4The directory is created with 0700 permission. ;TI"nApplication should not change the permission to make the temporary directory accessible from other users.;T@o; ; [I"HThe prefix and suffix of the name of the directory is specified by ;TI"7the optional first argument, prefix_suffix.;To:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0; [o; ; [I"TIf it is not specified or nil, "d" is used as the prefix and no suffix is used.;To;;0; [o; ; [I"GIf it is a string, it is used as the prefix and no suffix is used.;To;;0; [o; ; [I"cIf it is an array, first element is used as the prefix and second element is used as a suffix.;T@o:RDoc::Markup::Verbatim; [I"-Dir.mktmpdir {|dir| dir is ".../d..." } ;TI"6Dir.mktmpdir("foo") {|dir| dir is ".../foo..." } ;TI"BDir.mktmpdir(["foo", "bar"]) {|dir| dir is ".../foo...bar" } ;T: @format0o; ; [I"2The directory is created under Dir.tmpdir or ;TI"Jthe optional second argument tmpdir if non-nil value is given.;T@o;; [I"7Dir.mktmpdir {|dir| dir is "#{Dir.tmpdir}/d..." } ;TI"CDir.mktmpdir(nil, "/var/tmp") {|dir| dir is "/var/tmp/d..." } ;T;0o; ; [ I"If a block is given, ;TI"3it is yielded with the path of the directory. ;TI"0The directory and its contents are removed ;TI"?using FileUtils.remove_entry before Dir.mktmpdir returns. ;TI"(The value of the block is returned.;T@o;; [ I"Dir.mktmpdir {|dir| ;TI" # use the directory... ;TI"< open("#{dir}/foo", "w") { something using the file } ;TI"} ;T;0o; ; [I"If a block is not given, ;TI",The path of the directory is returned. ;TI"=In this case, Dir.mktmpdir doesn't remove the directory.;T@o;; [ I"dir = Dir.mktmpdir ;TI" begin ;TI" # use the directory... ;TI"< open("#{dir}/foo", "w") { something using the file } ;TI" ensure ;TI" # remove the directory. ;TI"" FileUtils.remove_entry dir ;TI"end;T;0: @fileI"lib/tmpdir.rb;T:0@omit_headings_from_table_of_contents_below00I"dup;T[I"*(prefix_suffix=nil, *rest, **options);T@QFI"Dir;TcRDoc::NormalClass00PK۰] rmdir-c.rinu[U:RDoc::AnyMethod[iI" rmdir:ETI"Dir::rmdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDeletes the named directory. Raises a subclass of SystemCallError ;TI""if the directory isn't empty.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"RDir.delete( string ) -> 0 Dir.rmdir( string ) -> 0 Dir.unlink( string ) -> 0 ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK۰]DDnew-c.rinu[U:RDoc::AnyMethod[iI"new:ETI" Dir::new;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"encoding keyword argument specifies the encoding of the directory. ;TI"7If not specified, the filesystem encoding is used.;T: @fileI" dir.rb;T:0@omit_headings_from_table_of_contents_below0I"HDir.new( string ) -> aDir Dir.new( string, encoding: enc ) -> aDir ;T0[I"(name, encoding: nil);T@FI"Dir;TcRDoc::NormalClass00PK۰]O children-i.rinu[U:RDoc::AnyMethod[iI" children:ETI"Dir#children;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns an array containing all of the filenames except for "." ;TI" and ".." in this directory.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("testdir") ;TI"-d.children #=> ["config.h", "main.rb"];T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.children -> array ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]>Z%each_child-c.rinu[U:RDoc::AnyMethod[iI"each_child:ETI"Dir::each_child;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HCalls the block once for each entry except for "." and ".." in the ;TI"Hnamed directory, passing the filename of each entry as a parameter ;TI"to the block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"6Dir.each_child("testdir") {|x| puts "Got #{x}" } ;T: @format0o; ; [I"produces:;T@o; ; [I"Got config.h ;TI"Got main.rb;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"0Dir.each_child( dirname ) {| filename | block } -> nil Dir.each_child( dirname, encoding: enc ) {| filename | block } -> nil Dir.each_child( dirname ) -> an_enumerator Dir.each_child( dirname, encoding: enc ) -> an_enumerator ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK۰]{ cdesc-Dir.rinu[U:RDoc::NormalClass[iI"Dir:ET@I" Object;To:RDoc::Markup::Document: @parts[o;;[: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0o;;[ o:RDoc::Markup::Paragraph;[I"=Objects of class Dir are directory streams representing ;TI"Gdirectories in the underlying file system. They provide a variety ;TI"Cof ways to list directories and their contents. See also File.;To:RDoc::Markup::BlankLineo; ;[ I"IThe directory used in these examples contains the two regular files ;TI"B(config.h and main.rb), the parent ;TI";directory (..), and the directory itself ;TI"(.).;T@S:RDoc::Markup::Heading: leveli: textI"What's Here;T@o; ;[I"*First, what's elsewhere. \Class \Dir:;T@o:RDoc::Markup::List: @type: BULLET: @items[o:RDoc::Markup::ListItem: @label0;[o; ;[I"PInherits from {class Object}[Object.html#class-Object-label-What-27s+Here].;To;;0;[o; ;[I"ZIncludes {module Enumerable}[Enumerable.html#module-Enumerable-label-What-27s+Here], ;TI"1which provides dozens of additional methods.;T@o; ;[I";Here, class \Dir provides methods that are useful for:;T@o;;;;[ o;;0;[o; ;[I"({Reading}[#class-Dir-label-Reading];To;;0;[o; ;[I"({Setting}[#class-Dir-label-Setting];To;;0;[o; ;[I"*{Querying}[#class-Dir-label-Querying];To;;0;[o; ;[I",{Iterating}[#class-Dir-label-Iterating];To;;0;[o; ;[I"${Other}[#class-Dir-label-Other];T@S; ;i;I" Reading;T@o;;;;[ o;;0;[o;;: NOTE;[o;;[I" #close;T;[o; ;[I",Closes the directory stream for +self+.;To;;0;[o;;;;[o;;[I" #pos=;T;[o; ;[I":Sets the position in the directory stream for +self+.;To;;0;[o;;;;[o;;[I" #read;T;[o; ;[I"IReads and returns the next entry in the directory stream for +self+.;To;;0;[o;;;;[o;;[I" #rewind;T;[o; ;[I"MSets the position in the directory stream for +self+ to the first entry.;To;;0;[o;;;;[o;;[I" #seek;T;[o; ;[I":Sets the position in the directory stream for +self+ ;TI"#the entry at the given offset.;T@S; ;i;I" Setting;T@o;;;;[o;;0;[o;;;;[o;;[I" ::chdir;T;[o; ;[I":Changes the working directory of the current process ;TI"to the given directory.;To;;0;[o;;;;[o;;[I" ::chroot;T;[o; ;[I":Changes the file-system root for the current process ;TI"to the given directory.;T@S; ;i;I" Querying;T@o;;;;[o;;0;[o;;;;[o;;[I" ::[];T;[o; ;[I"6Same as ::glob without the ability to pass flags.;To;;0;[o;;;;[o;;[I"::children;T;[o; ;[I"/Returns an array of names of the children ;TI":(both files and directories) of the given directory, ;TI"1but not including . or ...;To;;0;[o;;;;[o;;[I" ::empty?;T;[o; ;[I":Returns whether the given path is an empty directory.;To;;0;[o;;;;[o;;[I"::entries;T;[o; ;[I"/Returns an array of names of the children ;TI":(both files and directories) of the given directory, ;TI"*including . and ...;To;;0;[o;;;;[o;;[I" ::exist?;T;[o; ;[I"3Returns whether the given path is a directory.;To;;0;[o;;;;[o;;[I"::getwd (aliased as #pwd);T;[o; ;[I"7Returns the path to the current working directory.;To;;0;[o;;;;[o;;[I" ::glob;T;[o; ;[I"IReturns an array of file paths matching the given pattern and flags.;To;;0;[o;;;;[o;;[I" ::home;T;[o; ;[I"JReturns the home directory path for a given user or the current user.;To;;0;[o;;;;[o;;[I"#children;T;[o; ;[I"/Returns an array of names of the children ;TI"-(both files and directories) of +self+, ;TI"1but not including . or ...;To;;0;[o;;;;[o;;[I" #fileno;T;[o; ;[I"4Returns the integer file descriptor for +self+.;To;;0;[o;;;;[o;;[I" #path (aliased as #to_path);T;[o; ;[I",Returns the path used to create +self+.;To;;0;[o;;;;[o;;[I"#tell (aliased as #pos);T;[o; ;[I""Returns the integer position ;TI"(in the directory stream for +self+.;T@S; ;i;I"Iterating;T@o;;;;[ o;;0;[o;;;;[o;;[I"::each_child;T;[o; ;[I"CCalls the given block with each entry in the given directory, ;TI"1but not including . or ...;To;;0;[o;;;;[o;;[I"::foreach;T;[o; ;[I"BCalls the given block with each entryin the given directory, ;TI"*including . and ...;To;;0;[o;;;;[o;;[I" #each;T;[o; ;[I"6Calls the given block with each entry in +self+, ;TI"*including . and ...;To;;0;[o;;;;[o;;[I"#each_child;T;[o; ;[I"6Calls the given block with each entry in +self+, ;TI"1but not including . or ...;T@S; ;i;I" Other;T@o;;;;[ o;;0;[o;;;;[o;;[I" ::mkdir;T;[o; ;[I"FCreates a directory at the given path, with optional permissions.;To;;0;[o;;;;[o;;[I" ::new;T;[o; ;[I"CReturns a new \Dir for the given path, with optional encoding.;To;;0;[o;;;;[o;;[I" ::open;T;[o; ;[I"KSame as ::new, but if a block is given, yields the \Dir to the block, ;TI" closing it upon block exit.;To;;0;[o;;;;[o;;[I"/::unlink (aliased as ::delete and ::rmdir);T;[o; ;[I"!Removes the given directory.;To;;0;[o;;;;[o;;[I" #inspect;T;[o; ;[I",Returns a string description of +self+.;T; I" dir.rb;T; 0o;;[; I"lib/tmpdir.rb;T; 0; 0; 0[[[[I"Enumerable;To;;[; @ ; 0I" dir.c;T[[I" class;T[[: public[[:protected[[: private[[I"[];TI" dir.rb;T[I" chdir;T@[I" children;T@[I" chroot;T@[I" delete;T@[I"each_child;T@[I" empty?;T@[I" entries;T@[I" exist?;T@[I" foreach;T@[I" getwd;T@[I" glob;T@[I" home;T@[I" mkdir;T@[I" mktmpdir;TI"lib/tmpdir.rb;T[I"new;T@[I" open;T@[I"pwd;T@[I" rmdir;T@[I" tmpdir;T@[I" unlink;T@[I" instance;T[[;[[;[[;[[I" children;T@[I" close;T@[I" each;T@[I"each_child;T@[I" fileno;T@[I" inspect;T@[I" path;T@[I"pos;T@[I" pos=;T@[I" read;T@[I" rewind;T@[I" seek;T@[I" tell;T@[I" to_path;T@[[U:RDoc::Context::Section[i0o;;[; 0; 0[ I" dir.c;TI" dir.rb;TI"lib/cgi/session.rb;TI"lib/drb/unix.rb;TI"lib/tempfile.rb;TI"lib/tmpdir.rb;T@cRDoc::TopLevelPK۰]* chdir-c.rinu[U:RDoc::AnyMethod[iI" chdir:ETI"Dir::chdir;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [ I"GChanges the current working directory of the process to the given ;TI"Gstring. When called without an argument, changes the directory to ;TI"Athe value of the environment variable HOME, or ;TI"FLOGDIR. SystemCallError (probably Errno::ENOENT) if ;TI")the target directory does not exist.;To:RDoc::Markup::BlankLineo; ; [I"CIf a block is given, it is passed the name of the new current ;TI"Cdirectory, and the block is executed with that as the current ;TI"Jdirectory. The original working directory is restored when the block ;TI"Gexits. The return value of chdir is the value of the ;TI">block. chdir blocks can be nested, but in a ;TI"Imulti-threaded program an error will be raised if a thread attempts ;TI"Eto open a chdir block while another thread has one ;TI"Hopen or a call to chdir without a block occurs inside ;TI"Da block passed to chdir (even in the same thread).;T@o:RDoc::Markup::Verbatim; [I""Dir.chdir("/var/spool/mail") ;TI"puts Dir.pwd ;TI"Dir.chdir("/tmp") do ;TI" puts Dir.pwd ;TI" Dir.chdir("/usr") do ;TI" puts Dir.pwd ;TI" end ;TI" puts Dir.pwd ;TI" end ;TI"puts Dir.pwd ;T: @format0o; ; [I"produces:;T@o; ; [ I"/var/spool/mail ;TI" /tmp ;TI" /usr ;TI" /tmp ;TI"/var/spool/mail;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"WDir.chdir( [ string] ) -> 0 Dir.chdir( [ string] ) {| path | block } -> anObject ;T0[I" (*args);T@4FI"Dir;TcRDoc::NormalClass00PK۰]B tell-i.rinu[U:RDoc::AnyMethod[iI" tell:ETI" Dir#tell;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the current position in dir. See also Dir#seek.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"d = Dir.new("testdir") ;TI"d.tell #=> 0 ;TI"d.read #=> "." ;TI"d.tell #=> 12;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I",dir.pos -> integer dir.tell -> integer ;T0[[I"pos;T@ I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]BǏ close-i.rinu[U:RDoc::AnyMethod[iI" close:ETI"Dir#close;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I""Closes the directory stream. ;TI"HCalling this method on closed Dir object is ignored since Ruby 2.3.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("testdir") ;TI"d.close #=> nil;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.close -> nil ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]޲q unlink-c.rinu[U:RDoc::AnyMethod[iI" unlink:ETI"Dir::unlink;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"GDeletes the named directory. Raises a subclass of SystemCallError ;TI""if the directory isn't empty.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"RDir.delete( string ) -> 0 Dir.rmdir( string ) -> 0 Dir.unlink( string ) -> 0 ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK۰]hpos-i.rinu[U:RDoc::AnyMethod[iI"pos:ETI" Dir#pos;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the current position in dir. See also Dir#seek.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"d = Dir.new("testdir") ;TI"d.tell #=> 0 ;TI"d.read #=> "." ;TI"d.tell #=> 12;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dir;TcRDoc::NormalClass0[@FI" tell;TPK۰]  pos%3d-i.rinu[U:RDoc::AnyMethod[iI" pos=:ETI" Dir#pos=;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I">Synonym for Dir#seek, but returns the position parameter.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4d = Dir.new("testdir") #=> # ;TI"&d.read #=> "." ;TI"%i = d.pos #=> 12 ;TI"'d.read #=> ".." ;TI"%d.pos = i #=> 12 ;TI"&d.read #=> "..";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"#dir.pos = integer -> integer ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK۰]n4S<< children-c.rinu[U:RDoc::AnyMethod[iI" children:ETI"Dir::children;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"EReturns an array containing all of the filenames except for "." ;TI"Fand ".." in the given directory. Will raise a SystemCallError if ;TI"'the named directory doesn't exist.;To:RDoc::Markup::BlankLineo; ; [I"QThe optional encoding keyword argument specifies the encoding of the ;TI"Bdirectory. If not specified, the filesystem encoding is used.;T@o:RDoc::Markup::Verbatim; [I":Dir.children("testdir") #=> ["config.h", "main.rb"];T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"eDir.children( dirname ) -> array Dir.children( dirname, encoding: enc ) -> array ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK۰] path-i.rinu[U:RDoc::AnyMethod[iI" path:ETI" Dir#path;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"EReturns the path parameter passed to dir's constructor.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("..") ;TI"d.path #=> "..";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I" string or nil dir.to_path -> string or nil ;T0[[I" to_path;T@ I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]JV seek-i.rinu[U:RDoc::AnyMethod[iI" seek:ETI" Dir#seek;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"DSeeks to a particular location in dir. integer ;TI"*must be a value returned by Dir#tell.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"4d = Dir.new("testdir") #=> # ;TI"&d.read #=> "." ;TI"%i = d.tell #=> 12 ;TI"'d.read #=> ".." ;TI"4d.seek(i) #=> # ;TI"&d.read #=> "..";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I" dir.seek( integer ) -> dir ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK۰]=*xx fileno-i.rinu[U:RDoc::AnyMethod[iI" fileno:ETI"Dir#fileno;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"6Returns the file descriptor used in dir.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"d = Dir.new("..") ;TI"d.fileno #=> 8 ;T: @format0o; ; [I">This method uses dirfd() function defined by POSIX 2008. ;TI"HNotImplementedError is raised on other platforms, such as Windows, ;TI"(which doesn't provide the function.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.fileno -> integer ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]R@ open-c.rinu[U:RDoc::AnyMethod[iI" open:ETI"Dir::open;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"\The optional encoding keyword argument specifies the encoding of the directory. ;TI"7If not specified, the filesystem encoding is used.;To:RDoc::Markup::BlankLineo; ; [ I"FWith no block, open is a synonym for Dir::new. If a ;TI"Dblock is present, it is passed aDir as a parameter. The ;TI"Hdirectory is closed at the end of the block, and Dir::open returns ;TI"the value of the block.;T: @fileI" dir.rb;T:0@omit_headings_from_table_of_contents_below0I"Dir.open( string ) -> aDir Dir.open( string, encoding: enc ) -> aDir Dir.open( string ) {| aDir | block } -> anObject Dir.open( string, encoding: enc ) {| aDir | block } -> anObject ;TI"dir;T[I""(name, encoding: nil, &block);T@FI"Dir;TcRDoc::NormalClass00PK۰]}CC read-i.rinu[U:RDoc::AnyMethod[iI" read:ETI" Dir#read;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReads the next entry from dir and returns it as a string. ;TI"7Returns nil at the end of the stream.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"d = Dir.new("testdir") ;TI"d.read #=> "." ;TI"d.read #=> ".." ;TI"d.read #=> "config.h";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.read -> string or nil ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]y퍫 chroot-c.rinu[U:RDoc::AnyMethod[iI" chroot:ETI"Dir::chroot;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"AChanges this process's idea of the file system root. Only a ;TI"Aprivileged process may make this call. Not available on all ;TI"Eplatforms. On Unix systems, see chroot(2) for more ;TI"information.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"Dir.chroot( string ) -> 0 ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK۰]Z foreach-c.rinu[U:RDoc::AnyMethod[iI" foreach:ETI"Dir::foreach;TT: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"ICalls the block once for each entry in the named directory, passing ;TI"produces:;T@o; ; [ I" Got . ;TI" Got .. ;TI"Got config.h ;TI"Got main.rb;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"$Dir.foreach( dirname ) {| filename | block } -> nil Dir.foreach( dirname, encoding: enc ) {| filename | block } -> nil Dir.foreach( dirname ) -> an_enumerator Dir.foreach( dirname, encoding: enc ) -> an_enumerator ;T0[I" (*args);T@FI"Dir;TcRDoc::NormalClass00PK۰]%H** getwd-c.rinu[U:RDoc::AnyMethod[iI" getwd:ETI"Dir::getwd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the path to the current working directory of this process as ;TI"a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dir.chdir("/tmp") #=> 0 ;TI"$Dir.getwd #=> "/tmp" ;TI"#Dir.pwd #=> "/tmp";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"+Dir.getwd -> string Dir.pwd -> string ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]T'f rewind-i.rinu[U:RDoc::AnyMethod[iI" rewind:ETI"Dir#rewind;TF: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"1Repositions dir to the first entry.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [ I"d = Dir.new("testdir") ;TI"d.read #=> "." ;TI"&d.rewind #=> # ;TI"d.read #=> ".";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"dir.rewind -> dir ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]m&&pwd-c.rinu[U:RDoc::AnyMethod[iI"pwd:ETI" Dir::pwd;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"JReturns the path to the current working directory of this process as ;TI"a string.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"Dir.chdir("/tmp") #=> 0 ;TI"$Dir.getwd #=> "/tmp" ;TI"#Dir.pwd #=> "/tmp";T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"+Dir.getwd -> string Dir.pwd -> string ;T0[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰] each-i.rinu[U:RDoc::AnyMethod[iI" each:ETI" Dir#each;TF: privateo:RDoc::Markup::Document: @parts[ o:RDoc::Markup::Paragraph; [I"HCalls the block once for each entry in this directory, passing the ;TI"8filename of each entry as a parameter to the block.;To:RDoc::Markup::BlankLineo; ; [I"=If no block is given, an enumerator is returned instead.;T@o:RDoc::Markup::Verbatim; [I"d = Dir.new("testdir") ;TI"$d.each {|x| puts "Got #{x}" } ;T: @format0o; ; [I"produces:;T@o; ; [ I" Got . ;TI" Got .. ;TI"Got config.h ;TI"Got main.rb;T; 0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"[dir.each { |filename| block } -> dir dir.each -> an_enumerator ;T0[I"();T@ FI"Dir;TcRDoc::NormalClass00PK۰]W6P empty%3f-c.rinu[U:RDoc::AnyMethod[iI" empty?:ETI"Dir::empty?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"HReturns true if the named file is an empty directory, ;TI">false if it is not a directory or non-empty.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I".Dir.empty?(path_name) -> true or false ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK۰]77 tmpdir-c.rinu[U:RDoc::AnyMethod[iI" tmpdir:ETI"Dir::tmpdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"8Returns the operating system's temporary file path.;T: @fileI"lib/tmpdir.rb;T:0@omit_headings_from_table_of_contents_below000[I"();T@FI"Dir;TcRDoc::NormalClass00PK۰]ѫ5 exist%3f-c.rinu[U:RDoc::AnyMethod[iI" exist?:ETI"Dir::exist?;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [I"AReturns true if the named file is a directory, ;TI""false otherwise.;T: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"/Dir.exist?(file_name) -> true or false ;T0[I" (p1);T@FI"Dir;TcRDoc::NormalClass00PK۰])hH   mkdir-c.rinu[U:RDoc::AnyMethod[iI" mkdir:ETI"Dir::mkdir;TT: privateo:RDoc::Markup::Document: @parts[o:RDoc::Markup::Paragraph; [ I"DMakes a new directory named by string, with permissions ;TI"?specified by the optional parameter anInteger. The ;TI"Fpermissions may be modified by the value of File::umask, and are ;TI"Hignored on NT. Raises a SystemCallError if the directory cannot be ;TI"Bcreated. See also the discussion of permissions in the class ;TI"documentation for File.;To:RDoc::Markup::BlankLineo:RDoc::Markup::Verbatim; [I"7Dir.mkdir(File.join(Dir.home, ".foo"), 0700) #=> 0;T: @format0: @fileI" dir.c;T:0@omit_headings_from_table_of_contents_below0I"*Dir.mkdir( string [, integer] ) -> 0 ;T0[I"(p1, p2 = v2);T@FI"Dir;TcRDoc::NormalClass00PK۰]IT** entries-c.rinu[PK۰]1K33feach_child-i.rinu[PK۰]Шk to_path-i.rinu[PK۰]H home-c.rinu[PK۰]DD  inspect-i.rinu[PK۰]ײ,  delete-c.rinu[PK۰]_ʳ %5b%5d-c.rinu[PK۰])( glob-c.rinu[PK۰]B>L. . #mktmpdir-c.rinu[PK۰] l,rmdir-c.rinu[PK۰]DD[.new-c.rinu[PK۰]O 0children-i.rinu[PK۰]>Z%"3each_child-c.rinu[PK۰]{ [7cdesc-Dir.rinu[PK۰]*  Rchdir-c.rinu[PK۰]B !Ytell-i.rinu[PK۰]BǏ q[close-i.rinu[PK۰]޲q ]unlink-c.rinu[PK۰]h_pos-i.rinu[PK۰]  apos%3d-i.rinu[PK۰]n4S<< dchildren-c.rinu[PK۰] gpath-i.rinu[PK۰]JV +jseek-i.rinu[PK۰]=*xx 8mfileno-i.rinu[PK۰]R@ oopen-c.rinu[PK۰]}CC sread-i.rinu[PK۰]y퍫 #vchroot-c.rinu[PK۰]Z Uxforeach-c.rinu[PK۰]%H** r|getwd-c.rinu[PK۰]T'f ~rewind-i.rinu[PK۰]m&& pwd-c.rinu[PK۰] jeach-i.rinu[PK۰]W6P empty%3f-c.rinu[PK۰]77 tmpdir-c.rinu[PK۰]ѫ5 exist%3f-c.rinu[PK۰])hH   ܋mkdir-c.rinu[PK$$ 6