doFileOperations() and doResourceOperations in Copy task impl.

View: New views
2 Messages — Rating Filter:   Alert me  

doFileOperations() and doResourceOperations in Copy task impl.

by Raja Nagendra Kumar :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

I see two methods doFileOperations and doResourceOperations copy task. What is the difference between these two methods. How does Resource and File Operations differ.

Our need in looking to this is to customize copy so that every file copied would be replaced with all the ant properties in case the file has reference to ant properties.

Regards,
Raja Nagendra Kumar,
C.T.O
www.tejasoft.com

Re: doFileOperations() and doResourceOperations in Copy task impl.

by Stefan Bodewig :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On 2009-10-17, Raja Nagendra Kumar <Nagendra.Raja@...> wrote:

> I see two methods doFileOperations and doResourceOperations copy task.

Like many things that look wierd in Ant this is rooted in backwards
compatibility concerns.  For a long time copy only worked on files and
doFileOperations was where things happened.

Then we added support for arbitrary resources and we moved all handling
of non-file resources to doResourceOperations so that existing
subclasses of copy that don't support non-File resources can still work.

> Our need in looking to this is to customize copy so that every file
> copied would be replaced with all the ant properties in case the file
> has reference to ant properties.

It probably is a lot easier to add a filterchain with an
expandproperties filterreader in a plain copy task instead of writing a
subclass to achieve the same result.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@...
For additional commands, e-mail: dev-help@...