清华大佬耗费三个月吐血整理的几百G的资源,免费分享!....>>>
def traverse_dir(file_path) if File.directory? file_path Dir.foreach(file_path) do |file| if file !="." and file !=".." traverse_dir(file_path+"/"+file) end end else puts "File:#{File.basename(file_path)}, Size:#{File.size(file_path)}" end end traverse_dir('D:/apache-tomcat')