Alex Rivera | Logout

Is there an operation to move and overwrite files?

Asked 2013-01-18T13:32:35.527
14

I am looking for an operation to move and overwrite a File. I know that there is a new Method in Java7, but I was hoping to get around Java7. Also I know about the Methods in FileUtils and Guava, but the FileUtils won't overwrite and the Guava one does not document it.

Also I am aware, I could write my own Method, well I started, but saw some Problems here and there, so I was hoping for something already done.

Do you have any suggestions?

Edit
Report

1 Answer

1

In case you will proceed writing your own utility, you may want to take a look at implementation of the copy task in Ant since it supports overwriting.

answered 2013-01-18T13:40:28.630

Your Answer