1) move it to FileUtils
2) javadoc comment