groovy 递归遍历文件夹替换文件内容
def replace = {file -> def text = file.text.replaceAll(/[\s].*@.*/,"") file.withPrintWriter { printWriter -> printWriter.println(text) } }