|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--de.hunsicker.io.Copy
Helper routines for copying files or directories.
Method Summary | |
static boolean |
directory(java.io.File source,
java.io.File destination)
Copies the given directory to the new location. |
static boolean |
file(java.io.File source,
java.io.File destination)
Copies the given file to dest. |
static boolean |
file(java.io.File source,
java.io.File destination,
boolean overwrite)
Copies the given file to dest. |
static boolean |
file(java.lang.String source,
java.lang.String destination)
Copies the given file to dest. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean directory(java.io.File source, java.io.File destination) throws java.io.IOException
source
- the directory to copy.destination
- the destination directory.
true
if the operation ended upon success.
java.io.IOException
- if an I/O error occured.
java.lang.NullPointerException
- if source == null
java.lang.IllegalArgumentException
- if source does not exist or does not
denote a directory.public static boolean file(java.lang.String source, java.lang.String destination) throws java.io.IOException
file(File,File,boolean)
.
source
- source file.destination
- destination file.
true
if the file was sucessfully copied.
java.io.IOException
- if an I/O error occured.public static boolean file(java.io.File source, java.io.File destination) throws java.io.IOException
file(File,File,boolean)
.
source
- source file.destination
- destination file.
true
if the file was sucessfully copied
java.io.IOException
- if an I/O error occured.public static boolean file(java.io.File source, java.io.File destination, boolean overwrite) throws java.io.IOException
source
- source file.destination
- destination file.overwrite
- if true
the destination file will be always
overwritten if it already exists; if false
it will only be
overwritten if the source file is newer than the destination file.
true
if the file was sucessfully copied
java.io.IOException
- if an I/O error occured.
java.lang.NullPointerException
- if source == null
java.lang.IllegalArgumentException
- if source does not exist or does not
denote a file.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |