我有一个包含以下内容的 rakefile,SRC = FileList['md/*.md']
但我想排除一些文件
我试过了
SRC = FileList['md/*.md'].exclude("md/header.md")
SRC = FileList['md/*.md'].exclude(/header/)
SRC = FileList['md/*.md'].exclude(/header.md$/)
但它不起作用,总是列出我所有的文件
一个例子:
代替我的 rakefile.rb,我有一个目录 md,其中包含以下内容:
rakefile.rb
md/
index.md
example.md
header.md
我想列出所有没有 header.md