Interface BackupFileStore
- All Known Implementing Classes:
DefaultBackupFileStore
public interface BackupFileStore
Service to deal with access to backup files
- Since:
- v2.7
-
Method Summary
Modifier and TypeMethodDescriptionvoid
If there are more than the maximum number of automated backup files, delete the oldest onesextractTimestamp
(File file) Extract the timestamp from the name of the given backup file.Returns the directory where backup files are storedReturn a list of automated backup files, sorted by ascending date.
-
Method Details
-
getBackupDirectory
File getBackupDirectory()Returns the directory where backup files are stored- Returns:
- the directory where backup files are stored
-
getBackupFiles
Return a list of automated backup files, sorted by ascending date. Note: the date is taken from the filename, not from the file itself.- Returns:
- a list of
File
-
extractTimestamp
Extract the timestamp from the name of the given backup file.- Parameters:
file
- an automated backup file- Returns:
- a
Date
, ornull
if the file is not a valid backup file
-
cleanUpAutomatedBackupFiles
void cleanUpAutomatedBackupFiles()If there are more than the maximum number of automated backup files, delete the oldest ones
-