zoukankan      html  css  js  c++  java
  • Ant步步为营(2)在ftp上下载需要的文件

    早上好,开始一天工作之前先踩踩了园子,今天介绍ftp上下载文件。

    <?xml version="1.0"?>
        <project name="ForTest" default="ftp.download" >
        <property file="build.properties"></property>
            <target name= "ftp.download">
              <ftp action="get"
                     server="192.168.**.**"
                   userid="admin"
                   password="admin"
                     remotedir="/">
                <fileset dir="${file.dir}">
                      <include name="**"/>
                </fileset>
              </ftp>
            </target>
        </project>

    > <include name="**"/>此句是在ftp上筛选想要的文件。

    > action="get"这个需要声明,如果action不指定默认就是上传。

    > http://www.cnblogs.com/lightideal/archive/2012/02/27/2370210.html

    > Getting files from an FTP server works pretty much the same way as sending them does. The only difference is that the nested filesets use the remotedir attribute as the base directory for the files on the FTP server, and the dir attribute as the local directory to put the files into. The file structure from the FTP site is preserved on the local machine.(学习新知识,着手API,所有英语要过关)

  • 相关阅读:
    hibernate对应的annocation版本
    Struts 2 OGNL
    Struts2的Stack Context和ValueStack
    Struts2中的OGNL详解
    struts2中根对象以及ognl .
    在Struts 2中实现IoC
    Struts2的属性驱动与模型驱动的区别
    Struts2的模型驱动
    Java中线程的锁和数据库中的事务隔离级别
    为什么socket编程要用到多线程
  • 原文地址:https://www.cnblogs.com/QAZLIU/p/3698560.html
Copyright © 2011-2022 走看看