Sha256: fd7a9aad5c8d27b9188f5272e67a62c392ef1455258f5a12a0bd8d83e15aade5
Contents?: true
Size: 540 Bytes
Versions: 1
Compression:
Stored size: 540 Bytes
Contents
module Bagboy module Core class FileHelper include Singleton def get_directories ( path) Dir.entries(path).select { |entry| File.directory?(File.join(path, entry)) and !(entry == '.' || entry == '..')}.sort end def get_files( path ) Dir.entries(path).select { |entry| !(entry == '.' || entry == '..')}.sort end def read( path ) File.read path end def write ( path, text ) File.open(path, 'w') { |file| file.write(text) } end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
bagboy-0.0.1 | lib/bagboy/core/file_helper.rb |