D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
proc
/
self
/
root
/
opt
/
alt
/
ruby34
/
share
/
ri
/
system
/
FileUtils
/
Filename :
mkdir-i.ri
back
Copy
U:RDoc::AnyMethod[iI" mkdir:ETI"FileUtils#mkdir;TF:privateo:RDoc::Markup::Document:@parts[o:RDoc::Markup::Paragraph; [I":Creates directories at the paths in the given +list+ ;TI"+(a single path or an array of paths); ;TI"Areturns +list+ if it is an array, <tt>[list]</tt> otherwise.;To:RDoc::Markup::BlankLine o; ; [I"%Argument +list+ or its elements ;TI"Kshould be {interpretable as paths}[rdoc-ref:FileUtils@Path+Arguments].;T@o; ; [I"MWith no keyword arguments, creates a directory at each +path+ in +list+ ;TI"1by calling: <tt>Dir.mkdir(path, mode)</tt>; ;TI")see {Dir.mkdir}[rdoc-ref:Dir.mkdir]:;T@o:RDoc::Markup::Verbatim; [I":FileUtils.mkdir(%w[tmp0 tmp1]) # => ["tmp0", "tmp1"] ;TI"2FileUtils.mkdir('tmp4') # => ["tmp4"] ;T:@format0o; ; [I"Keyword arguments:;T@o:RDoc::Markup::List: @type:BULLET:@items[o:RDoc::Markup::ListItem:@label0; [o; ; [I"N<tt>mode: <i>mode</i></tt> - also calls <tt>File.chmod(mode, path)</tt>; ;TI"+see {File.chmod}[rdoc-ref:File.chmod].;To;;0; [o; ; [I"7<tt>noop: true</tt> - does not create directories.;To;;0; [o; ; [I";<tt>verbose: true</tt> - prints an equivalent command:;T@o;; [I"3FileUtils.mkdir(%w[tmp0 tmp1], verbose: true) ;TI"?FileUtils.mkdir(%w[tmp2 tmp3], mode: 0700, verbose: true) ;T; 0o; ; [I"Output:;T@o;; [I"mkdir tmp0 tmp1 ;TI"mkdir -m 700 tmp2 tmp3 ;T; 0o; ; [I";Raises an exception if any path points to an existing ;TI"Kfile or directory, or if for any reason a directory cannot be created.;T@o; ; [I" Related: FileUtils.mkdir_p.;T: @fileI"lib/fileutils.rb;T:0@omit_headings_from_table_of_contents_below000[ I"/(list, mode: nil, noop: nil, verbose: nil);T@EFI"FileUtils;TcRDoc::NormalModule00