The Java File Copy Library is a software library that provides an easy and powerful API for file copy operations. You can define a batch of copy jobs with regular expressions and can use a Swing Component to show the overall copy progress.
You can define some copy jobs that all have one destination and one or more sources defined by regular expressions:
CopyJob copyJob = new CopyJob(true, "/destination", "/source1/*", "/source2/.*.java");
This function uses
Varargs
for the source parameters. This way you can specify as many sources as you
want.
If you are done with defining your copy jobs you can let them execute by a FileCopier instance all at once.
fileCopier.copy(copyJob1, copyJob2);
This function again uses
Varargs
for the parameters. This way you can throw as many copy jobs at a
FileCopier at once as you want.
If you want to see the progress of your copy operation in a GUI application, you can add a FileCopierPanel to your GUI application and give it a reference to your current FileCopier:
FileCopier fileCopier = new FileCopier();
fileCopierPanel.setFileCopier(fileCopier);
In GUI applications you should use a
SwingWorker
to execute the fileCopier.copy() operation.
The Java File Copy Library Swing Component shows the following information per default:
Simple example:
For Downloads, Bug Tracking, etc. please see the SourceForge Project for Java File Copy Library