Blame view

src/com/sitech/util/upload/FTPIF.java 1.15 KB
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51
package com.sitech.util.upload;

public interface FTPIF {
	/**
	 * 登录
	 * @param host
	 * @param username
	 * @param password
	 * @throws Exception
	 */
	public void login(String host, String username, String password) throws Exception;

	/**
	 * 退出
	 * @param host
	 * @param username
	 * @param password
	 * @throws Exception
	 */
	public void logout() throws Exception;

	/**
	 * 上传文件
	 * 
	 * @param toRfileName 上传的新文件名
	 * @param uploadFile 要上传的文件
	 */
	public boolean store(String uploadFile, String toRfileName)
			throws Exception;
	
	/**
	 * 列出远程目录下面所有的文件
	 * 
	 * @param remoteDir 远程目录
	 */
	public RemoteFile[] listRemoteFile(String remoteDir) throws Exception;
	
	/**
	 * 列出远程目录下面指定的文件
	 * 
	 * @param remoteDir 远程目录
	 * @param fileName 文件名
	 */
	public RemoteFile listRemoteFile(String remoteDir, String fileName) throws Exception;

	public boolean chdir(String remoteDir) throws Exception ;

	public boolean get(String fileName, String localFileName)  throws Exception ;
	
	public boolean rename(String fromName, String toName) throws Exception;
}