开发者

Ruby -> get all files in directories

I want to get a list of all files in a directory that contain multiple sub-directories (and p开发者_如何学编程ossible more sub-directories within them)

How can I do this using Ruby on my Mac OS X?

Thanks


Something like this should work

Dir["**/*"].select{|x| !File.directory?(x)}
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜