public static boolean deleteFile(String filePathAndName){
  if ((filePathAndName == null) || filePathAndName.isEmpty()) {
    return false;
  }
  boolean isSuccessfulDelete=false;
  try {
    File fileToDelete=new File(filePathAndName);
    isSuccessfulDelete=fileToDelete.delete();
  }
 catch (  Exception e) {
    logger.debug(e.toString() + System.lineSeparator() + StackTrace.getStringFromStackTrace(e));
    isSuccessfulDelete=false;
  }
  return isSuccessfulDelete;
}

public static boolean deleteFile ( String filePathAndName ) { if ( ( filePathAndName == null ) || filePathAndName . isEmpty ( ) ) { return false ; } boolean isSuccessfulDelete = false ; try { File fileToDelete = new File ( filePathAndName ) ; isSuccessfulDelete = fileToDelete . delete ( ) ; } catch ( Exception e ) { logger . debug ( e . toString ( ) + System . lineSeparator ( ) + StackTrace . getStringFromStackTrace ( e ) ) ; isSuccessfulDelete = false ; } return isSuccessfulDelete ; }
this is a quiet method .
