Created
December 1, 2015 03:04
-
-
Save piaoger/3cc21ec6067e2b489d2f to your computer and use it in GitHub Desktop.
fileutils.scala
This file contains hidden or 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
| def deleteFile(dfile : File) : Unit = { | |
| if(dfile.isDirectory){ | |
| val files = dfile.listFiles | |
| if(files != null) | |
| files.foreach{ f => deleteFile(f) } | |
| } | |
| dfile.delete | |
| } | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment