Sha256: 1a10194ea198ee1572059017decd1fdad74ef9bc7eb52cde3386fb5c811b3f64
Contents?: true
Size: 392 Bytes
Versions: 4
Compression:
Stored size: 392 Bytes
Contents
class File class << self 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
4 entries across 4 versions & 2 rubygems
Version | Path |
---|---|
ruby-ext-0.2.1 | lib/ruby_ext/file.rb |
ruby-ext-0.2.0 | lib/ruby_ext/file.rb |
RubyExt-0.1.1 | lib/RubyExt/file.rb |
RubyExt-0.1.2 | lib/RubyExt/file.rb |