targetPath = workingDir + File.separator + targetDir + File.separator + file.getName();
createDir(workingDir + File.separator + targetDir);
}
if (file.canRead()) {
ssh.newSCPFileTransfer().upload(new FileSystemFile(file), targetPath);
LOG.debug("Uploaded file " + file.getAbsolutePath() + " to " + targetPath);
} else {
LOG.error("Cannot load file " + file.getAbsolutePath() + " for upload");
throw new TavernaExecutorException("Cannot load file " + file.getAbsolutePath() + " for upload");
}