Sha256: 4c83062301f11165f582cd7fedbec947557bd7a0adce23127c2f68569475252a
Contents?: true
Size: 651 Bytes
Versions: 1
Compression:
Stored size: 651 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 FileUtils.mkdir_p 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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
ruby-ext-0.2.12 | lib/ruby_ext/file.rb |