private void performCopytoTask(final Map<FileInfo, FileInfo> copyToMap) {
        for (final Map.Entry<FileInfo, FileInfo> entry : copyToMap.entrySet()) {
            final URI copytoTarget = entry.getKey().uri;
            final URI copytoSource = entry.getValue().uri;
            final URI srcFile = job.tempDirURI.resolve(copytoSource);
            final URI targetFile = job.tempDirURI.resolve(copytoTarget);

            if (new File(targetFile).exists()) {
                logger.warn(MessageUtils.getMessage("DOTX064W", copytoTarget.getPath()).toString());
            } else {
                final FileInfo input = job.getFileInfo(fi -> fi.isInput).iterator().next();
                final URI inputMapInTemp = job.tempDirURI.resolve(input.uri);
                copyFileWithPIReplaced(srcFile, targetFile, copytoTarget, inputMapInTemp);
                // add new file info into job
                final FileInfo src = job.getFileInfo(copytoSource);
                assert src != null;
                final FileInfo dst = job.getFileInfo(copytoTarget);
                assert dst != null;
                final URI dstTemp = tempFileNameScheme.generateTempFileName(dst.result);
                final FileInfo res = new FileInfo.Builder(src)
                        .result(dst.result)
                        .uri(dstTemp)
                        .build();
                job.add(res);
            }
        }
    }
private void performCopytoTask ( final Map < FileInfo , FileInfo > copyToMap ) { for ( final Map . Entry < FileInfo , FileInfo > entry : copyToMap . entrySet ( ) ) { final URI copytoTarget = entry . getKey ( ) . uri ; final URI copytoSource = entry . getValue ( ) . uri ; final URI srcFile = job . tempDirURI . resolve ( copytoSource ) ; final URI targetFile = job . tempDirURI . resolve ( copytoTarget ) ; if ( new File ( targetFile ) . exists ( ) ) { logger . warn ( MessageUtils . getMessage ( "DOTX064W" , copytoTarget . getPath ( ) ) . toString ( ) ) ; } else { final FileInfo input = job . getFileInfo ( fi -> fi . isInput ) . iterator ( ) . next ( ) ; final URI inputMapInTemp = job . tempDirURI . resolve ( input . uri ) ; copyFileWithPIReplaced ( srcFile , targetFile , copytoTarget , inputMapInTemp ) ; final FileInfo src = job . getFileInfo ( copytoSource ) ; assert src != null ; final FileInfo dst = job . getFileInfo ( copytoTarget ) ; assert dst != null ; final URI dstTemp = tempFileNameScheme . generateTempFileName ( dst . result ) ; final FileInfo res = new FileInfo . Builder ( src ) . result ( dst . result ) . uri ( dstTemp ) . build ( ) ; job . add ( res ) ; } } }
Execute copy-to task, generate copy-to targets base on sources.

@param copyToMap target to source map of URIs relative to temporary directory