code: public static boolean delete(final File aDir) {
          if (aDir.exists() && aDir.listFiles() != null) {
              for (final File file : aDir.listFiles()) {
                  if (file.isDirectory()) {
                      if (!delete(file)) {
                          LOGGER.error(MessageCodes.UTIL_012, file);
                      }
                  } else {
                      if (file.exists() && !file.delete()) {
                          LOGGER.error(MessageCodes.UTIL_012, file);
                      }
                  }
              }
          } else if (LOGGER.isDebugEnabled() && aDir.listFiles() == null) {
              LOGGER.debug(MessageCodes.UTIL_013, aDir);
          }
  
          return aDir.delete();
      }
docs: Deletes a directory and all its children.
  
  @param aDir A directory to delete
  @return True if file was successfully deleted; else, false