I am planning to add a VfsCopy task to the gradle VFS plugin

For a next release I am planning to extend the VFS (https://github.com/ysb33r/groovy-vfs) plugin with some tasks. The intent is to mirror the Copy, Move and Mkdir tasks in syntax as far as possible, but adapt and extend to fit what VFS does - work with objects on remote & virtual filesystems.

I have placed the conceptual DSL for a VfsCopy task in a Gist

How do you like it? Feedback would be appreciated.

Hi Shalk,

You could conceivably use exactly the same API, but you would have to use internal types. Take a look at the Zip task for how to do this.

This may not fit, but it’s worth a try. It would also be great feedback for us, knowing how this is deficient for this use case.

Hey Luke,

I originally looked at creating a vfsTree object in a similar vein as zipTree/tarTree. It would have meant that Copy & Move tasks could have used it. Unfortunately that won’t work at this point as fileTree and its superclasses/interfaces have a strong dependency on the java.io.File class.

I’ll have a look at the Zip task though.