Sha256: b92f33dc296fe4ef96bacba9e65da399e64f87e955c1a8ab16c2c5bebd481209
Contents?: true
Size: 593 Bytes
Versions: 56
Compression:
Stored size: 593 Bytes
Contents
# # this is all here in case this example is run from the examples directory # begin require 'hitimes' rescue LoadError => le %w[ ext lib ].each do |p| path = File.expand_path( File.join( File.dirname( __FILE__ ), "..", p ) ) if $:.include?( path ) then raise le end $: << path end retry end s = Hitimes::Stats.new dir = ARGV.shift || Dir.pwd Dir.entries( dir ).each do |entry| fs = File.stat( entry ) if fs.file? then s.update( fs.size ) end end Hitimes::Stats::STATS.each do |m| puts "#{m.rjust(6)} : #{s.send( m ) }" end puts s.to_hash.inspect
Version data entries
56 entries across 54 versions & 4 rubygems