private void deletePath ( File path ) { if ( path . isDirectory ( ) ) { File [ ] files = path . listFiles ( ) ; if ( files != null ) { for ( File file : files ) { deletePath ( file ) ; } } } path . delete ( ) ; }
deletes the whole path going through directories