public static boolean deleteFilesInADirectory(String directoryPath){
  if ((directoryPath == null) || directoryPath.isEmpty()) {
    return false;
  }
  boolean isSuccessfulDelete=true;
  List<File> files=getListOfFilesInADirectory(directoryPath);
  if (files == null) {
    return false;
  }
  try {
    for (    File file : files) {
      boolean fileDeleteSuccess=deleteFile(directoryPath,file.getName());
      if (!fileDeleteSuccess) {
        isSuccessfulDelete=false;
      }
    }
  }
 catch (  Exception e) {
    logger.debug(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
    isSuccessfulDelete=false;
  }
  return isSuccessfulDelete;
}

public static boolean deleteFilesInADirectory ( String directoryPath ) { if ( ( directoryPath == null ) || directoryPath . isEmpty ( ) ) { return false ; } boolean isSuccessfulDelete = true ; List < File > files = getListOfFilesInADirectory ( directoryPath ) ; if ( files == null ) { return false ; } try { for ( File file : files ) { boolean fileDeleteSuccess = deleteFile ( directoryPath , file . getName ( ) ) ; if ( ! fileDeleteSuccess ) { isSuccessfulDelete = false ; } } } catch ( Exception e ) { logger . debug ( e . toString ( ) + System . lineSeparator ( ) + StackTrace . getStringFromStackTrace ( e ) ) ; isSuccessfulDelete = false ; } return isSuccessfulDelete ; }
this is a quiet method .
