Stdlib offers both Dir#glob and the Find module. Coupled with Enumerable methods and the plethora of file test methods, this gives you all you need to simply implement file find behaviour.
于 2013-03-19T15:24:07.763 回答
This answer is useful
1
You can use Dir.glob
Dir.glob "**/*" do |file_path|
#do somthing with file_path
end