I think it'd be a useful addition.  My only suggestion would be change the
parameter name to "forceoverwrite" so it matches the similar parameter in
<copydir>.

K.C.

> -----Original Message-----
> From: uli stehling [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, August 15, 2000 12:55 PM
> To: [EMAIL PROTECTED]
> Subject: newbie question - how does contribution work
> 
> 
> Hello!
> 
> Due to problems with different clocks on different servers I 
> changed the
> Copyfile class to implement an overwrite function (which 
> already existed in
> the Project class).
> 
> My questions:
> 1 is anyone interested in this overwrite funcionality
> 2 if yes how would it be implemented into the cvs
> 
> Regards
> 
> uli
> 
> PS the new code:
> 
> public class Copyfile extends Task {
> 
>     private File srcFile;
>     private File destFile;
>     private boolean filtering = false;
>     private boolean overwriteFlag = false;
> 
>     public void setSrc(String src) {
>         srcFile = project.resolveFile(src);
>     }
> 
>     public void setDest(String dest) {
>         destFile = project.resolveFile(dest);
>     }
> 
>     public void setFiltering(String filter) {
>         filtering = Project.toBoolean(filter);
>     }
> 
>       public void setOverwrite(String overwrite) {
>               overwriteFlag = Project.toBoolean(overwrite);
>       }
> 
>     public void execute() throws BuildException {
>               try {
>                       project.copyFile(srcFile, destFile, 
> filtering, overwriteFlag);
>               } catch (IOException ioe) {
>                       String msg = "Error copying file: " + 
> srcFile.getAbsolutePath()
>                               + " due to " + ioe.getMessage();
>                       throw new BuildException(msg);
>               }
>       }
> }
> 
> PPS I have tested it and it seems to work fine on version 1.1
> 
> 
> ____________________________________________________________________
> Get your own FREE, personal Netscape WebMail account today at 
http://webmail.netscape.com.

Reply via email to