D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
FileUtils
/
Filename :
cd-c.ri
back
Copy
U:RDoc::AnyMethod[iI"cd:ETI"FileUtils::cd;TT:publico:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I"=Changes the working directory to the given +dir+, which ;TI"Lshould be {interpretable as a path}[rdoc-ref:FileUtils@Path+Arguments]:;To:RDoc::Markup::BlankLine o; ; [I"With no block given, ;TI"Kchanges the current directory to the directory at +dir+; returns zero:;T@o:RDoc::Markup::Verbatim; [ I"*FileUtils.pwd # => "/rdoc/fileutils" ;TI"FileUtils.cd('..') ;TI" FileUtils.pwd # => "/rdoc" ;TI"FileUtils.cd('fileutils') ;T:@format0o; ; [I"HWith a block given, changes the current directory to the directory ;TI"4at +dir+, calls the block with argument +dir+, ;TI"Land restores the original current directory; returns the block's value:;T@o;; [I"NFileUtils.pwd # => "/rdoc/fileutils" ;TI"LFileUtils.cd('..') { |arg| [arg, FileUtils.pwd] } # => ["..", "/rdoc"] ;TI"NFileUtils.pwd # => "/rdoc/fileutils" ;T; 0o; ; [I"Keyword arguments:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I";<tt>verbose: true</tt> - prints an equivalent command:;T@o;; [I"FileUtils.cd('..') ;TI"FileUtils.cd('fileutils') ;T; 0o; ; [I"Output:;T@o;; [I"cd .. ;TI"cd fileutils ;T; 0o; ; [I"Related: FileUtils.pwd.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below00I"dir;T[[I" chdir;To;; [ ;@<;0I"(dir, verbose: nil);T@<FI"FileUtils;TcRDoc::NormalModule00