Recursive delete current directory

/ Published in: Groovy
Save to your folder(s)

Safe way to recursive delete directory

Copy this code and paste it in your HTML
  1. deltree = {f ->
  2. if ( f.eachFile {deltree(it)}
  3. f.delete()
  4. }
  5. deltree(new File('.'))

URL: groovy_rm_rf

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.