private boolean createFolder(String debugDirectory){
  File dir=new File(debugDirectory);
  if (dir.exists()) {
    Date previousRecordDate;
    try {
      JsonValue infoJson=JsonValueBuilder.toJsonValue(IOUtils.getFileContent(debugDirectory + File.separator + RecordConstants.INFO_FILE_NAME));
      previousRecordDate=recordReport.getDateFromInfoReport(infoJson);
    }
 catch (    IOException|ParseException|JsonValueException e) {
      debug.error("Can't extract starting date from previous record. We will use the current date instead",e);
      previousRecordDate=newDate();
    }
    SimpleDateFormat dateFormat=new SimpleDateFormat(DATE_FORMAT_UID);
    dir.renameTo(new File(debugDirectory + "_" + dateFormat.format(previousRecordDate)));
  }
  return dir.mkdirs();
}

private boolean createFolder ( String debugDirectory ) { File dir = new File ( debugDirectory ) ; if ( dir . exists ( ) ) { Date previousRecordDate ; try { JsonValue infoJson = JsonValueBuilder . toJsonValue ( IOUtils . getFileContent ( debugDirectory + File . separator + RecordConstants . INFO_FILE_NAME ) ) ; previousRecordDate = recordReport . getDateFromInfoReport ( infoJson ) ; } catch ( IOException | ParseException | JsonValueException e ) { debug . error ( "Can't extract starting date from previous record. We will use the current date instead" , e ) ; previousRecordDate = newDate ( ) ; } SimpleDateFormat dateFormat = new SimpleDateFormat ( DATE_FORMAT_UID ) ; dir . renameTo ( new File ( debugDirectory + "_" + dateFormat . format ( previousRecordDate ) ) ) ; } return dir . mkdirs ( ) ; }
create the record directory
