private void deleteFilesInDir(File dir){
  for (  File child : dir.listFiles()) {
    child.delete();
  }
}

private void deleteFilesInDir ( File dir ) { for ( File child : dir . listFiles ( ) ) { child . delete ( ) ; } }
deletes all files in a folder
