Skip to content
Find file
Fetching contributors…
Cannot retrieve contributors at this time
11 lines (9 sloc) 207 Bytes
require 'find'
files = {}
Find.find('.') do |f|
files[f] = File::size?(f) if (f != '.' && f != '..')
end
sorted = files.sort_by {|k,v| v}.reverse
sorted.each do |k,v|
puts "File: #{k} - Size: #{v}"
end
Something went wrong with that request. Please try again.