想找下一份詳細的說明文章沒找到,鬱悶~~~
/**
* org.apache.commons.net.ftp.FTPClient
*
* FTPClient ftp = new FTPClient();
* ftp.connect("10.1.3.xxx"); //連接
* ftp.login("pona", "pona"); //登陸
* ftp.changeWorkingDirectory(String path); //改變目錄
* FTPFile [] ftpfile = ftp.listFiles(); //獲取問件數組
* FileOutputStream out = new FileOutputStream("c:/"+ftpfile[i].getName()); //創建輸出流
* ftp.retrieveFile(ftpfile[i].getName(), out) //下載文件
*
*
* ftp.setFileType(FTP.ASCII_FILE_TYPE); //設置爲2進制上傳
* File file = new File("c:/sqlnet1.log"); //需要上傳的文件
* FileInputStream fis = new FileInputStream(file);
* ftp.storeFile(file.getName(), fis) //上傳文件
* ftp.rename(file.getName(), toworking) //移動問件
*
* //釋放對象
* ftp.logout();
* ftp.disconnect();
* ftp = null;
* @param args
*/