1
我正在使用Pathname.glob来匹配文件。Ruby - Pathname.glob - 匹配隐藏和非隐藏文件
只有Pathname.glob("**/*")
比赛非隐藏文件
Pathname.glob("**/.*")
比赛只隐藏文件
有什么办法同时匹配?
您的帮助将不胜感激!
我正在使用Pathname.glob来匹配文件。Ruby - Pathname.glob - 匹配隐藏和非隐藏文件
只有Pathname.glob("**/*")
比赛非隐藏文件
Pathname.glob("**/.*")
比赛只隐藏文件
有什么办法同时匹配?
您的帮助将不胜感激!
Pathname.glob("**/*", File::FNM_DOTMATCH)
来源:http://www.ruby-doc.org/core-2.1.2/Dir.html#method-c-glob