APIdock / Ruby
/
method

mkdir

ruby latest stable - Class: Shell ::CommandProcessor
mkdir(*path)
public

Same as Dir.mkdir, except multiple directories are allowed.

# File lib/shell/command-processor.rb, line 198
 def mkdir(*path)
 @shell.check_point
 notify("mkdir #{path.join(' ')}")
 perm = nil
 if path.last.kind_of?(Integer)
 perm = path.pop
 end
 for dir in path
 d = expand_path(dir)
 if perm
 Dir.mkdir(d, perm)
 else
 Dir.mkdir(d)
 end
 File.chmod(d, 0666 & [email protected]) if @shell.umask
 end
 Void.new(@shell)
 end

AltStyle によって変換されたページ (->オリジナル) /