Sha256: ac44ef4c58cb98c6227b580e0e35c4b75a3c49ec2c6bae30be8ec1a9d80bb9d8
Contents?: true
Size: 398 Bytes
Versions: 1
Compression:
Stored size: 398 Bytes
Contents
module Treedisha module Filesystem def self.all_files(root_path) Dir.glob("#{root_path}/**/*").find_all do |f| !File.directory? f end end def self.all_files_with_sha1(root_path) all_files(root_path).map do |f| [sha1_for_file(f), f] end end def self.sha1_for_file(file) Digest::SHA1.file(file).to_s end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
treedisha-0.0.2 | lib/treedisha/filesystem.rb |