ÿØÿà JFIF    ÿÛ „ ( %!1!%*+...983,7(-.- 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::TopLevel