org.axiondb.io
Class FileUtil

java.lang.Object
  extended by org.axiondb.io.FileUtil

public class FileUtil
extends Object

Common file utils.

Version:
$Revision: 1.5 $ $Date: 2005/04/14 00:30:02 $

Constructor Summary
FileUtil()
           
 
Method Summary
static void assertFileNotLocked(File file)
           
static boolean delete(File file)
          Get rid of File file, whether a true file or dir.
static long getLength(File file)
           
static void renameFile(File dir, String old, String name, String ext)
           
static void renameToUpperCase(File dir)
           
static void truncate(File file, long length)
          Truncate file to a given length
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileUtil

public FileUtil()
Method Detail

assertFileNotLocked

public static void assertFileNotLocked(File file)
                                throws AxionException
Throws:
AxionException

delete

public static boolean delete(File file)
                      throws AxionException
Get rid of File file, whether a true file or dir.

Throws:
AxionException

getLength

public static long getLength(File file)
                      throws IOException
Throws:
IOException

renameFile

public static void renameFile(File dir,
                              String old,
                              String name,
                              String ext)

renameToUpperCase

public static void renameToUpperCase(File dir)
                              throws IOException
Throws:
IOException

truncate

public static void truncate(File file,
                            long length)
                     throws AxionException
Truncate file to a given length

Throws:
AxionException
See Also:
FileChannel.truncate()}