资源简介
支持FTP开发的一个程序,可用与上传下载文件,可用

代码片段和文件信息
/*
*
* Copyright (C) 2006 Enterprise Distributed Technologies Ltd
*
* www.enterprisedt.com
*/
import com.enterprisedt.net.ftp.FileTransferClient;
import com.enterprisedt.util.debug.Level;
import com.enterprisedt.util.debug.Logger;
public class ChangeDirectory {
public static void main(String[] args) {
// we want remote host user name and password
if (args.length < 3) {
System.out
.println(“Usage: run remote-host username password directory“);
System.exit(1);
}
// extract command-line arguments
String host = args[0];
String username = args[1];
String password = args[2];
String dir = args[3];
// set up logger so that we get some output
Logger log = Logger.getLogger(ChangeDirectory.class);
Logger.setLevel(Level.INFO);
FileTransferClient ftp = null;
try {
// create client
log.info(“Creating FTP client“);
ftp = new FileTransferClient();
// set remote host
ftp.setRemoteHost(host);
ftp.setUserName(username);
ftp.setPassword(password);
// connect to the server
log.info(“Connecting to server “ + host);
ftp.connect();
log.info(“Connected and logged in to server “ + host);
log.info(“Current dir: “ + ftp.getRemoteDirectory());
log.info(“Changing directory“);
ftp.changeDirectory(dir);
log.info(“Current dir: “ + ftp.getRemoteDirectory());
log.info(“Changing up“);
ftp.changeToParentDirectory();
log.info(“Current dir: “ + ftp.getRemoteDirectory());
// Shut down client
log.info(“Quitting client“);
ftp.disconnect();
log.info(“Example complete“);
} catch (Exception e) {
e.printStackTrace();
}
}
}
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2012-12-24 12:36 edtftpj-2.4.0\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\net\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\net\ftp\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\net\ftp\class-use\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\util\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\util\class-use\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\util\debug\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\util\debug\class-use\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\util\proxy\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\com\enterprisedt\util\proxy\class-use\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\api\resources\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\manual\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\manual\html\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\manual\images\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\doc\manual\rfc\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\change_directories\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\connect_to_an_FTP_server\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\get_a_directory_listing\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\monitor_transfers_and_commands\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\pause_and_resume_transfers\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\set_up_logging\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\transfer_using_streams\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\upload_download_and_delete_a_file\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\use_active_passive_mode\
目录 0 2012-12-24 12:36 edtftpj-2.4.0\examples\howto\use_binary_ascii_mode\
............此处省略431个文件信息
- 上一篇:无陀螺捷联式惯性导航系统
- 下一篇:PowerWorld使用手册
相关资源
- FTP课程设计(服务端+客户端)
- python实现的ftp自动上传、下载脚本
- 用Socket编程实现FTP
- tftp文件传输工具
- linux 网络实验 ftp程序
- 用Socket写的简易FTP服务器和客户端
- 基于C 的简易FTP客户端(带源码)
- 用IdFTPServer写的一个FTPServer程序
- FTP命令详解.doc
- 一个简单方便的服务端ftp搭建工具
- 20cn的ftp服务器超好用 简洁
- 最好用的FTP服务器
- CuteFTP8.0绿色破解版免安装无需序列号
- PSFTP.EXE 工具
- CuteFTP8.0简体中文破解版
- Wing FTP Server FTP服务器 v6.1.9
- 易语言绵绵FTP网络验证操作模块源码
- 免费的2014ftp暴力破解扫描工具可自动
- linux c下的ftp客户端和服务器端
- Notepad++ ftp/sftp 插件
- 8uftp安装
- Xshell6+Xftp6绿色_破解版解压后点击绿色
- ftp断点续传,ftp协议网络抓拍数据
- redhat vsftp
- Windows Server 2016 部署FTP服务器
- 1688图片采集工具 v3.0.0.4.zip
- Qt之FTP客户端
- 编译通过的Sipek.SoftPhone
- Linux课设实现ftp服务器和客户端
- Renci.SshNet.dll及其文档和实现SSH、SCP、
评论
共有 条评论