ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From uli stehling <uli...@netscape.net>
Subject newbie question - how does contribution work
Date Tue, 15 Aug 2000 16:54:51 GMT
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.

Mime
View raw message