Sha256: 7a53a302fc1ae6b0202ec98f3c367ccd46eab34e57155d657d6d6f7826ba1072
Contents?: true
Size: 433 Bytes
Versions: 2
Compression:
Stored size: 433 Bytes
Contents
require 'fileutils' File.class_eval do def file_name File.basename path end class << self def write(path, data) File.open(path, "wb") do |file| return file.write(data) 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ruby_ext-0.4.25 | lib/ruby_ext/core/file.rb |
ruby_ext-0.4.24 | lib/ruby_ext/core/file.rb |