@Ignore @Test public void testRemoveBackupExtension() throws Exception { }
public static void removeBackupExtension() { File dir = getDataDir(); File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.toLowerCase().endsWith(".imported"); } }); for (File file : files) { int pos = file.getName().toLowerCase().indexOf(".csv"); String chopped = file.getName().substring(0, pos + 4); logger.info(file.getName() + " ---> " + chopped); chopped = dir.getAbsolutePath() + "/" + chopped; file.renameTo(new File(chopped)); } }
BrahmsImportUtil { public static void removeBackupExtension() { File dir = getDataDir(); File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.toLowerCase().endsWith(".imported"); } }); for (File file : files) { int pos = file.getName().toLowerCase().indexOf(".csv"); String chopped = file.getName().substring(0, pos + 4); logger.info(file.getName() + " ---> " + chopped); chopped = dir.getAbsolutePath() + "/" + chopped; file.renameTo(new File(chopped)); } } }
BrahmsImportUtil { public static void removeBackupExtension() { File dir = getDataDir(); File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.toLowerCase().endsWith(".imported"); } }); for (File file : files) { int pos = file.getName().toLowerCase().indexOf(".csv"); String chopped = file.getName().substring(0, pos + 4); logger.info(file.getName() + " ---> " + chopped); chopped = dir.getAbsolutePath() + "/" + chopped; file.renameTo(new File(chopped)); } } BrahmsImportUtil(); }
BrahmsImportUtil { public static void removeBackupExtension() { File dir = getDataDir(); File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.toLowerCase().endsWith(".imported"); } }); for (File file : files) { int pos = file.getName().toLowerCase().indexOf(".csv"); String chopped = file.getName().substring(0, pos + 4); logger.info(file.getName() + " ---> " + chopped); chopped = dir.getAbsolutePath() + "/" + chopped; file.renameTo(new File(chopped)); } } BrahmsImportUtil(); static File[] getCsvFiles(); static void backup(); static void removeBackupExtension(); static ScientificName getScientificName(CSVRecordInfo<BrahmsCsvField> record); static DefaultClassification getDefaultClassification(CSVRecordInfo<BrahmsCsvField> record,
			ScientificName sn); static List<Monomial> getSystemClassification(DefaultClassification dc); static String getAuthor(CSVRecordInfo<BrahmsCsvField> record); static String getInfraspecificMarker(CSVRecordInfo<BrahmsCsvField> record); static String getInfraspecificEpithet(CSVRecordInfo<BrahmsCsvField> record); static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record); static File getDataDir(); }
BrahmsImportUtil { public static void removeBackupExtension() { File dir = getDataDir(); File[] files = dir.listFiles(new FilenameFilter() { @Override public boolean accept(File dir, String name) { return name.toLowerCase().endsWith(".imported"); } }); for (File file : files) { int pos = file.getName().toLowerCase().indexOf(".csv"); String chopped = file.getName().substring(0, pos + 4); logger.info(file.getName() + " ---> " + chopped); chopped = dir.getAbsolutePath() + "/" + chopped; file.renameTo(new File(chopped)); } } BrahmsImportUtil(); static File[] getCsvFiles(); static void backup(); static void removeBackupExtension(); static ScientificName getScientificName(CSVRecordInfo<BrahmsCsvField> record); static DefaultClassification getDefaultClassification(CSVRecordInfo<BrahmsCsvField> record,
			ScientificName sn); static List<Monomial> getSystemClassification(DefaultClassification dc); static String getAuthor(CSVRecordInfo<BrahmsCsvField> record); static String getInfraspecificMarker(CSVRecordInfo<BrahmsCsvField> record); static String getInfraspecificEpithet(CSVRecordInfo<BrahmsCsvField> record); static String getTaxonRank(CSVRecordInfo<BrahmsCsvField> record); static File getDataDir();  }