Skip to content
Discussion options

You must be logged in to vote

You can use rsync in that workflow handler. In Groovy, you can call execute() on a string to execute it like a command:

"rsync ${workflow.workDir} ${targetDir}".execute()

The copyTo() method does mimic the behavior of cp -r, which includes recursive copying of a directory. But you have to think about how the existence of the target affects the behavior:

  • if the target doesn't exist, the source directory becomes the target directory
  • if the target exists as a file, the copy fails
  • if the target exists as a directory, the source directory is copied into the target directory
    • if a file or directory with the same name as the source already exists in the target directory, the copy fails

I thi…

Replies: 9 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by bentsherman
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #3881 on April 19, 2023 22:14.