|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectesmska.persistence.BackupManager
public class BackupManager
Manager for taking care of backups of user configuration files.
| Constructor Summary | |
|---|---|
BackupManager(java.io.File backupRoot)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
backupFiles(java.util.Collection<java.io.File> files,
boolean overwrite)
Back up selected files to backup directory. |
void |
removeOldBackups(int backupsPreserved)
Clean backup directory from old backup subdirs. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BackupManager(java.io.File backupRoot)
backupRoot - Directory under which the backups will be created and managed.
Not null.| Method Detail |
|---|
public boolean backupFiles(java.util.Collection<java.io.File> files,
boolean overwrite)
throws java.io.IOException
files - files to back up. Not null. Non-existent files are ignored.overwrite - if backup should overwrite already existing subdirectory
(i.e. backup from today)
java.io.IOException
public void removeOldBackups(int backupsPreserved)
throws java.io.IOException
backupsPreserved - how many old backups should be preserved. All other
(older) backups will be deleted. Negative integer is converted to 0.
java.io.IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||