Class: Dir
Class Method Summary collapse
-
.mkdir_r(dirPath) ⇒ Object
TODO replace FileUtils.mkdir_p.
Class Method Details
.mkdir_r(dirPath) ⇒ Object
TODO replace FileUtils.mkdir_p
7 8 9 10 11 12 13 14 15 16 |
# File 'lib/keystone/core_ext/dir.rb', line 7 def self.mkdir_r(dirPath) folders = dirPath.split('/') folderToCreate = '' folders.each do |folder| folderToCreate += folder + '/' if !File.directory?(folderToCreate) Dir.mkdir(folderToCreate) end end end |