com.stc.connector.framework.util
Class FileHelper
java.lang.Object
com.stc.connector.framework.util.FileHelper
- public class FileHelper
- extends java.lang.Object
Utilities for File manipulation.
- Version:
- $Version$
- Author:
- $Author: kgambrel $
Field Summary |
protected static java.util.ResourceBundle |
labels
Locale specific strings displayed to the user. |
Method Summary |
static void |
move(java.io.File from,
java.io.File to)
Move a file from one location to another. |
static void |
move(java.io.File from,
java.io.File to,
boolean overwrite)
Move a file from one location to another. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
labels
protected static java.util.ResourceBundle labels
- Locale specific strings displayed to the user.
FileHelper
public FileHelper()
move
public static void move(java.io.File from,
java.io.File to)
throws java.io.IOException
- Move a file from one location to another. An attempt is made to rename
the file and if that fails, the file is copied and the old file
deleted. If the destination file already exists, an exception will be
thrown.
- Parameters:
from
- file which should be moved.to
- desired destination of the file.
- Throws:
java.io.IOException
- if an error occurs.
move
public static void move(java.io.File from,
java.io.File to,
boolean overwrite)
throws java.io.IOException
- Move a file from one location to another. An attempt is made to rename
the file and if that fails, the file is copied and the old file
deleted.
- Parameters:
from
- file which should be moved.to
- desired destination of the file.overwrite
- If false, an exception will be thrown rather than
overwrite a file.
- Throws:
java.io.IOException
- if an error occurs.