org.axiondb.io
Class FileUtil
java.lang.Object
org.axiondb.io.FileUtil
public class FileUtil
- extends java.lang.Object
Common file utils.
- Version:
- $Revision: 1.5 $ $Date: 2005/04/14 00:30:02 $
Method Summary |
static void |
assertFileNotLocked(java.io.File file)
|
static boolean |
delete(java.io.File file)
Get rid of File file, whether a true file or dir. |
static long |
getLength(java.io.File file)
|
static void |
renameFile(java.io.File dir,
java.lang.String old,
java.lang.String name,
java.lang.String ext)
|
static void |
renameToUpperCase(java.io.File dir)
|
static void |
truncate(java.io.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 |
FileUtil
public FileUtil()
assertFileNotLocked
public static void assertFileNotLocked(java.io.File file)
throws AxionException
- Throws:
AxionException
delete
public static boolean delete(java.io.File file)
throws AxionException
- Get rid of File file, whether a true file or dir.
- Throws:
AxionException
getLength
public static long getLength(java.io.File file)
throws java.io.IOException
- Throws:
java.io.IOException
renameFile
public static void renameFile(java.io.File dir,
java.lang.String old,
java.lang.String name,
java.lang.String ext)
renameToUpperCase
public static void renameToUpperCase(java.io.File dir)
throws java.io.IOException
- Throws:
java.io.IOException
truncate
public static void truncate(java.io.File file,
long length)
throws AxionException
- Truncate file to a given length
- Throws:
AxionException
- See Also:
FileChannel.truncate()}