|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--de.hunsicker.io.FileBackup
Handles backup generation for files.
| Field Summary | |
static int |
NUMBERED
Make numbered backups of every file by appending ~REVISION~ to the file. |
static int |
SIMPLE
Make simple backups of every file. |
| Method Summary | |
static java.io.File |
create(java.io.File file,
java.io.File directory)
Returns the new backup file for the given file. |
static java.io.File |
create(java.io.File file,
java.io.File directory,
int backupLevel)
Returns the name of the new backup file for the given file.. |
static java.io.File |
create(java.io.File file,
java.io.File directory,
int backupType,
java.lang.String suffix,
int backupLevel)
Returns the new backup file for the given file. |
static java.io.File |
create(java.lang.String content,
java.lang.String filename,
java.io.File directory,
int backupLevel)
Creates and returns the new backup file for the given content. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NUMBERED
public static final int SIMPLE
| Method Detail |
public static java.io.File create(java.io.File file,
java.io.File directory)
throws java.io.IOException
5.
file - the file to back up.directory - the directory to copy the backup to. If the directory doesn't
exist, it will be created.
java.io.IOException - if an I/O error occured.
public static java.io.File create(java.io.File file,
java.io.File directory,
int backupLevel)
throws java.io.IOException
file - the file to back up.directory - the directory to copy the backup to. If the directory doesn't
exist, it will be created.backupLevel - number of revisions to hold.
java.io.IOException - if an I/O error occured.
public static java.io.File create(java.lang.String content,
java.lang.String filename,
java.io.File directory,
int backupLevel)
throws java.io.IOException
content - content to write to a backup file.filename - the filename of the backup file.directory - the directory to create the backup in. If the directory doesn't
exist, it will be created.backupLevel - number of revisions to hold.
java.io.IOException - if an I/O error occured.
public static java.io.File create(java.io.File file,
java.io.File directory,
int backupType,
java.lang.String suffix,
int backupLevel)
throws java.io.IOException
file - the file to back up.directory - the directory to copy the backup to. If the directory doesn't
exist, it will be created.backupType - the type of the backup. Either SIMPLE or NUMBERED.suffix - the suffix to designate a backup file, ignored for the NUMBERED backup type.backupLevel - number of revisions to hold, ignored for the SIMPLE
backup type.
java.io.IOException - if an I/O error occured.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||