public class FileHelper
extends java.lang.Object
| Constructor and Description |
|---|
FileHelper() |
| Modifier and Type | Method and Description |
|---|---|
static void |
copy(java.io.File src,
java.io.File dest)
Copy the source file in the destination.
|
static void |
copy(java.lang.String src,
java.lang.String dest)
Copy the source file in the destination.
|
static void |
link(java.io.File src,
java.io.File dest)
Link the source file in the destination.
|
static void |
link(java.lang.String src,
java.lang.String dest)
Link the source file in the destination.
|
public static void copy(java.io.File src,
java.io.File dest)
throws java.io.IOException
src - The file to copydest - The copied filejava.io.IOException - In case of I/O error while copyingpublic static void copy(java.lang.String src,
java.lang.String dest)
throws java.io.IOException
src - The path of the source filedest - The path of the dest filejava.io.IOException - In case of I/O error while copyingpublic static void link(java.lang.String src,
java.lang.String dest)
throws java.io.IOException
Java does not support file links and this method should be implemented with the help of JNI. This problems should be fixed in the incoming JDK7.
In this version the link is replaced by a copy. TODO: Implement this method with JNI and use JDK7 method when available
src - The path of the source filedest - The path of the dest filejava.io.IOException - In case of I/O error while linkingpublic static void link(java.io.File src,
java.io.File dest)
throws java.io.IOException
Java does not support file links and this method should be implemented with the help of JNI. This problems should be fixed in the incoming JDK7.
In this version the link is replaced by a copy. TODO: Implement this method with JNI and use JDK7 method when available
src - The file to copydest - The copied filejava.io.IOException - In case of I/O error while copying