Skip to content

Instantly share code, notes, and snippets.

@piaoger
Created December 1, 2015 03:04
Show Gist options
  • Select an option

  • Save piaoger/3cc21ec6067e2b489d2f to your computer and use it in GitHub Desktop.

Select an option

Save piaoger/3cc21ec6067e2b489d2f to your computer and use it in GitHub Desktop.
fileutils.scala
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