org.jpop.io
Class FileUtils

java.lang.Object
  extended byorg.jpop.io.FileUtils

public class FileUtils
extends java.lang.Object

Author:
ug57dsm

Field Summary
static java.lang.String BACKUP_POSTFIX
          the postfix to be appended to backed up files
static int MAX_BACKUP_LEVEL
          The maximmun number of backup files there should be at any time
 
Constructor Summary
FileUtils()
           
 
Method Summary
static java.io.File makeFile(java.lang.String filename)
          Makes and returns a file
static void moveToBackup(java.lang.String filename, int count)
          Moves a file to a backup file, pushing any other backup files on the way if necessary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BACKUP_POSTFIX

public static final java.lang.String BACKUP_POSTFIX
the postfix to be appended to backed up files

See Also:
Constant Field Values

MAX_BACKUP_LEVEL

public static final int MAX_BACKUP_LEVEL
The maximmun number of backup files there should be at any time

See Also:
Constant Field Values
Constructor Detail

FileUtils

public FileUtils()
Method Detail

moveToBackup

public static void moveToBackup(java.lang.String filename,
                                int count)
Moves a file to a backup file, pushing any other backup files on the way if necessary

Parameters:
filename - The name of the file to move
count - The count of backups pushed

makeFile

public static java.io.File makeFile(java.lang.String filename)
                             throws java.io.IOException
Makes and returns a file

Parameters:
filename - The name of the file to make
Returns:
A new file
Throws:
java.io.IOException