|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jboss.maven.util.file.DirectoryCopier
public class DirectoryCopier
Copies a directory with its structure intact. Optionally allows defining
includes and/or excludes. Internally uses a DirectoryScanner, mainly
to ensure we filter out "standard excludes" (like SCM dirs) but also to apply
any optional includes and/or excludes.
| Constructor Summary | |
|---|---|
DirectoryCopier(File sourceDirectory)
Instantiates a directory copier over the given source directory. |
|
| Method Summary | |
|---|---|
static void |
copyFileIfModified(File source,
File destination)
Copies the source file to the destination file. |
void |
copyTo(File targetDirectory)
Copy contents of the source directory to the given target directory. |
void |
copyTo(File targetDirectory,
String[] includes,
String[] excludes)
Copy contents of the source directory to the given target directory. |
File |
getSourceDirectory()
Retrieve the source directory. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DirectoryCopier(File sourceDirectory)
sourceDirectory - The directory from which to copy.| Method Detail |
|---|
public File getSourceDirectory()
public void copyTo(File targetDirectory)
throws IOException
source directory to the given target directory.
Same as copy(targetDirectory,null,null)
targetDirectory - The directory to which to copy the content
IOException - Indicates a problem performing the copy.
public void copyTo(File targetDirectory,
String[] includes,
String[] excludes)
throws IOException
source directory to the given target directory.
NOTE: the copier copies all content to the target directory except forAbstractScanner.addDefaultExcludes()
targetDirectory - The directory to which to copy the matching contentincludes - Explicit inclusion match filename patterns.excludes - Explicit exclusion match filename patterns.
IOException - Indicates a problem performing the copy.
public static void copyFileIfModified(File source,
File destination)
throws IOException
source - The file to be copieddestination - The file to which to copy the source.
IOException - Indicates a problem performing the copy.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||