You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Karthik <ka...@xius.org> on 2006/03/06 07:20:29 UTC

ANT FTP TASK

Hi form

  I found this piece of code on the web and am struck with the API

  1)Would like to know how to add files to "addFileSet"

   for thr code below.


  public void setCopXinTask(String fromSrc,String toDirName) {
		Project project = createProject();
		FTP ftp = new FTP();
		
		ftp.setServer("192.168.150.120");
		ftp.setRemotedir("/home/projectt/karthik");
		ftp.setPort(22);
		ftp.setUserid("projectt");
		ftp.setPassword("abc1234");		
	
		
            //?? how to add files from source to filset 	
		
		ftp.addFileset( ???? );		
		ftp.execute();
	}



Please somebody help me



with regards
Karthik

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


RE: ANT FTP TASK

Posted by Karthik <ka...@xius.org>.
Hi Form

Fileset in ANT manual has these 2 Constructers...

/////////////////////////////
Constructor Summary

  	FileSet()

protected 	FileSet(FileSet fileset)
///////////////////////////////////


So I do not know how to use the directory files to this
fileset and use the same for FTP based target



Please some body help



with regards
Karthik


-----Original Message-----
From: bill/wilandra [mailto:bill@wilandra.com]
Sent: Monday, March 06, 2006 12:38 PM
To: 'Ant Users List'
Subject: RE: ANT FTP TASK


Having never looked at the code, but, applying a little logic to the problem
I would ask if there is a Fileset class and if that class has an addFile
method? Then you should be able to see how to make a Fileset instance and
add File objects to it. Have you tried looking at the API doc to see if you
can find the Fileset class and go from there?

HTH Bill

-----Original Message-----
From: Karthik [mailto:karthikn@xius.org]
Sent: Sunday, March 05, 2006 10:20 PM
To: user@ant.apache.org
Subject: ANT FTP TASK

Hi form

  I found this piece of code on the web and am struck with the API

  1)Would like to know how to add files to "addFileSet"

   for thr code below.


  public void setCopXinTask(String fromSrc,String toDirName) {
		Project project = createProject();
		FTP ftp = new FTP();

		ftp.setServer("192.168.150.120");
		ftp.setRemotedir("/home/projectt/karthik");
		ftp.setPort(22);
		ftp.setUserid("projectt");
		ftp.setPassword("abc1234");


            //?? how to add files from source to filset

		ftp.addFileset( ???? );
		ftp.execute();
	}



Please somebody help me



with regards
Karthik

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





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


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


RE: ANT FTP TASK

Posted by bill/wilandra <bi...@wilandra.com>.
Having never looked at the code, but, applying a little logic to the problem
I would ask if there is a Fileset class and if that class has an addFile
method? Then you should be able to see how to make a Fileset instance and
add File objects to it. Have you tried looking at the API doc to see if you
can find the Fileset class and go from there?

HTH Bill 

-----Original Message-----
From: Karthik [mailto:karthikn@xius.org] 
Sent: Sunday, March 05, 2006 10:20 PM
To: user@ant.apache.org
Subject: ANT FTP TASK

Hi form

  I found this piece of code on the web and am struck with the API

  1)Would like to know how to add files to "addFileSet"

   for thr code below.


  public void setCopXinTask(String fromSrc,String toDirName) {
		Project project = createProject();
		FTP ftp = new FTP();
		
		ftp.setServer("192.168.150.120");
		ftp.setRemotedir("/home/projectt/karthik");
		ftp.setPort(22);
		ftp.setUserid("projectt");
		ftp.setPassword("abc1234");		
	
		
            //?? how to add files from source to filset 	
		
		ftp.addFileset( ???? );		
		ftp.execute();
	}



Please somebody help me



with regards
Karthik

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





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