class File
Public Class Methods
ensure_exist(path)
click to toggle source
# File lib/haora/file.rb, line 5 def self.ensure_exist(path) dir = File.dirname path FileUtils.makedirs dir unless Dir.exist? dir FileUtils.touch path unless File.exist? path end