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

**URL:** <https://discuss.gradle.org/t/i-am-planning-to-add-a-vfscopy-task-to-the-gradle-vfs-plugin/409>\
**Category:** Old Forum Archive\
**Created:** [April 9, 2014, 4:15pm UTC](https://discuss.gradle.org/t/i-am-planning-to-add-a-vfscopy-task-to-the-gradle-vfs-plugin/409 "2014-04-09T16:15:00Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Schalk\_Cronje](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/schalk_cronje/32/6511_2.png) [@Schalk\_Cronje](https://discuss.gradle.org/u/Schalk_Cronje)\
**Post date:** [April 9, 2014, 4:15pm UTC](https://discuss.gradle.org/t/i-am-planning-to-add-a-vfscopy-task-to-the-gradle-vfs-plugin/409/1 "2014-04-09T16:15:00Z")

</div>

For a next release I am planning to extend the VFS ([https://github.com/ysb33r/groovy-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

> <https://gist.github.com/ysb33r/10286590>

How do you like it? Feedback would be appreciated.

---

<div class="post-metadata">

**Author:** ![luke\_daley](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/luke_daley/32/9890_2.png) [@luke\_daley](https://discuss.gradle.org/u/luke_daley)\
**Post date:** [April 9, 2014, 11:15pm UTC](https://discuss.gradle.org/t/i-am-planning-to-add-a-vfscopy-task-to-the-gradle-vfs-plugin/409/2 "2014-04-09T23:15:00Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![Schalk\_Cronje](https://sea1.discourse-cdn.com/gradle/user_avatar/discuss.gradle.org/schalk_cronje/32/6511_2.png) [@Schalk\_Cronje](https://discuss.gradle.org/u/Schalk_Cronje)\
**Post date:** [April 9, 2014, 11:35pm UTC](https://discuss.gradle.org/t/i-am-planning-to-add-a-vfscopy-task-to-the-gradle-vfs-plugin/409/3 "2014-04-09T23:35:00Z")

</div>

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.
