Return to Snippet

Revision: 62181
at February 6, 2013 23:22 by alces


Initial Code
deltree = {f -> 
    if (f.directory) f.eachFile {deltree(it)}
    f.delete()
} 
deltree(new File('.'))

Initial URL
groovy_rm_rf

Initial Description
Safe way to recursive delete directory

Initial Title
Recursive delete current directory

Initial Tags
file, groovy

Initial Language
Groovy