public static boolean deleteDirectoryFiles(Set<String> inputFilePathsAndNames){
  if ((inputFilePathsAndNames == null)) {
    return false;
  }
  boolean didSuccessfullyDeleteAllFiles=true;
  try {
    for (    String filePathAndName : inputFilePathsAndNames) {
      File file=new File(filePathAndName);
      if (!file.isDirectory()) {
        boolean deleteSuccess=deleteFile(filePathAndName);
        if (!deleteSuccess) {
          logger.debug("Warning - " + filePathAndName + " failed to delete");
          didSuccessfullyDeleteAllFiles=false;
        }
      }
    }
  }
 catch (  Exception e) {
    logger.debug(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
    return false;
  }
  return didSuccessfullyDeleteAllFiles;
}

public static boolean deleteDirectoryFiles ( Set < String > inputFilePathsAndNames ) { if ( ( inputFilePathsAndNames == null ) ) { return false ; } boolean didSuccessfullyDeleteAllFiles = true ; try { for ( String filePathAndName : inputFilePathsAndNames ) { File file = new File ( filePathAndName ) ; if ( ! file . isDirectory ( ) ) { boolean deleteSuccess = deleteFile ( filePathAndName ) ; if ( ! deleteSuccess ) { logger . debug ( "Warning - " + filePathAndName + " failed to delete" ) ; didSuccessfullyDeleteAllFiles = false ; } } } } catch ( Exception e ) { logger . debug ( e . toString ( ) + System . lineSeparator ( ) + StackTrace . getStringFromStackTrace ( e ) ) ; return false ; } return didSuccessfullyDeleteAllFiles ; }
this is a quiet method . only deletes files . doesn ' t delete directories .
