{
newfile.delete();
}
- File[] tmpFiles = BackupFiles.lsBackupFiles(newFile, suffix, digits);
+ File[] tmpFiles = getBackupFiles(newFile, suffix, digits);
for (int i = 0; i < tmpFiles.length; i++)
{
if (actuallyDeleteTmpFiles)
}
}
+ private static File[] getBackupFiles(String f, String s, int i)
+ {
+ TreeMap<Integer, File> bfTreeMap = BackupFiles.getBackupFilesAsTreeMap(f,
+ s, i);
+ File[] backupFiles = new File[bfTreeMap.size()];
+ bfTreeMap.values().toArray(backupFiles);
+ return backupFiles;
+ }
+
private static File[] getBackupFiles()
{
- return BackupFiles.lsBackupFiles(newFile, suffix, digits);
+ return getBackupFiles(newFile, suffix, digits);
}
private static boolean checkBackupFiles(HashMap<Integer, String> indexmap)
throws IOException
{
- TreeMap<Integer, File> map = BackupFiles.lsBackupFilesAsTreeMap(newFile,
+ TreeMap<Integer, File> map = BackupFiles.getBackupFilesAsTreeMap(newFile,
suffix, digits);
Enumeration<Integer> indexesenum = Collections
.enumeration(indexmap.keySet());
private static boolean checkBackupFiles(int[] indexes) throws IOException
{
- TreeMap<Integer, File> map = BackupFiles.lsBackupFilesAsTreeMap(newFile,
+ TreeMap<Integer, File> map = BackupFiles.getBackupFilesAsTreeMap(newFile,
suffix, digits);
for (int m = 0; m < indexes.length; m++)
{
private static String[] getBackupFilesAsStrings()
{
- File[] files = BackupFiles.lsBackupFiles(newFile, suffix, digits);
+ File[] files = getBackupFiles(newFile, suffix, digits);
String[] filenames = new String[files.length];
for (int i = 0; i < files.length; i++)
{