Sha256: 866294aa57315bc6643ba97bc6c243e3a6a48c39c83f88945a1caa0697a8fa6b
Contents?: true
Size: 643 Bytes
Versions: 7
Compression:
Stored size: 643 Bytes
Contents
File.class_eval do class << self # There is similar methods in ActiveSupport, that takes also second paramether buffer # these methods 'as is' will broken rails app with passenger in production. # # def write(path, data) # File.open(path, "wb") do |file| # return file.write(data) # end # end # # def read(path) # File.open(path, "rb") do |file| # return file.read # end # end def create_directory dir Dir.mkdir dir unless File.exist? dir end def delete_directory dir FileUtils.rm_r dir, :force => true if File.exist? dir end end end
Version data entries
7 entries across 7 versions & 1 rubygems