Java File Copy Library

Powerful API for file copy operations
Download

Java File Copy Library Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Other/Proprietary Li...
  • Price:
  • FREE
  • Publisher Name:
  • Ronny Standtke
  • Publisher web site:

Java File Copy Library Tags


Java File Copy Library Description

Powerful API for file copy operations Java File Copy Library is a software library which 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.Before starting the copy operation you define the sources with a base directory and a search pattern defined by regular expressions. Then you define the copy destinations (yes, you can copy your files to several destinations at once). With the given sources and destinations you can define a copy job: Source[] sources = new Source[]{ // all files from directory /home/user/source1/ new Source("/home/user/source1/", ".*"), // all *.java files from directory /home/user/source2/ new Source("/home/user/source2/", ".*\.java") }; String[] destinations = new String[]{ "/home/user/destination1", "/home/user/destination2" }; CopyJob copyJob = new CopyJob(sources, destinations, true/*recursive*/); 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 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: * the already copied amount of data * the data volume of all specified copy jobs * the speed of the copy operation * the progress of the copy operation (both graphical and numerical) * the elapsed time * the estimated total time * the estimated remaining time * the estimated completion time Requirements: · Java 2 Standard Edition Runtime Environment


Java File Copy Library Related Software