我想在我的文件系统中搜索扩展名为.template的任何文件.
除了.htaccess.template之外,以下内容适用于所有内容
FileList.new(File.join(root,'**','*.template')).each do |file| # do stuff with file end
因为windows不喜欢无名文件,grrrr
如何在Windows上进行此操作?这段代码在Linux上工作正常….
解决方法
怎么样
Dir.glob([".*.template","*.template"])