public static void copyFiles(Directory source,Directory target,List<String> files) throws IOException {
  if (!source.equals(target)) {
    for (    String file : files) {
      target.copyFrom(source,file,file,IOContext.READONCE);
    }
  }
}

public static void copyFiles ( Directory source , Directory target , List < String > files ) throws IOException { if ( ! source . equals ( target ) ) { for ( String file : files ) { target . copyFrom ( source , file , file , IOContext . READONCE ) ; } } }
copies the files from the source directory to the target one , if they are not the same .
