Module: ReFe::FileUtils
- Included in:
- Database
- Defined in:
- lib/refe/fileutils.rb
Instance Method Summary collapse
Instance Method Details
#mkdir_p(path) ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/refe/fileutils.rb', line 15 def mkdir_p( path ) dir = File.(path) stack = [] until FileTest.directory?(dir) stack.push dir dir = File.dirname(dir) end stack.reverse_each do |n| Dir.mkdir n end end |