Created
May 16, 2011 03:48
-
-
Save kyonmm/973901 to your computer and use it in GitHub Desktop.
指定ディレクトリ配下のファイルの改行コードを変換する
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
new File("src").eachDirRecurse { | |
it.eachFile { | |
if (it.isFile()) { | |
def s = "${it.readLines().join("\n")}\n" | |
BufferedWriter w = it.newWriter("UTF-8") | |
w.write(s) | |
w.flush() | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment