ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <bode...@apache.org>
Subject Re: Problem copying file using ANT API
Date Tue, 11 Dec 2001 08:14:20 GMT
On Tue, 11 Dec 2001, Shiladitya Ghosh <Shiladitya.Ghosh@hpsglobal.com>
wrote:

> 		Copy cpy = new Copy();

*never* instantiate an Ant task directly.  In your case,

                Copy cpy = (Copy) project.createTask("copy");

will avoid the Exception, but is still unsafe (we may chose to change
the class implementing the copy task in the future).

To copy a file, take a look at org.apache.tools.ant.util.FileUtils.

Stefan

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message