@@ -0,0 +1,1984 @@
+package com.teradata.ec.component.hadooptools.util;%0A%0Aimport java.io.*;%0A%0A/**%0A * Created by Administrator on 2015/11/17.%0A */%0Apublic class FileCrawler %7B%0A    private static boolean flag = false;%0A    private static String destPre1 = null;%0A    private static String destPre2 = null;%0A%0A    /**%0A     * %E5%A4%8D%E5%88%B6%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95%E5%8F%8A%E5%85%B6%E5%AD%90%E7%9B%AE%E5%BD%95%E4%B8%8B%E6%89%80%E6%9C%89%E6%96%87%E4%BB%B6%E5%88%B0%E5%8F%A6%E5%A4%96%E4%B8%80%E4%B8%AA%E7%9B%AE%E5%BD%95%0A     * @param strSrc%0A     * @param strDest%0A     * @throws IOException%0A     */%0A    public static void copyFiles(String strSrc, String strDest, boolean needDelete) throws IOException %7B%0A        destPre1 = destPre2;%0A        if(!flag) %7B%0A            destPre1 = strDest;%0A            destPre2 = strDest + %22/%22;//%E4%BF%9D%E7%95%99%E6%9C%80%E5%88%9D%E7%9A%84%E8%B7%AF%E5%BE%84%0A            flag = true;//%E6%A0%87%E5%BF%97%0A        %7D%0A        File src = new File(strSrc+%22/%22);%0A        File dest = new File(strDest);%0A        if (src.isDirectory()) %7B%0A            String files%5B%5D = src.list();%0A            for (String file : files) %7B%0A                File srcFile = new File(src, file);%0A                //File destFile = new File(dest, file);%0A                if(!srcFile.isDirectory()) %7B%0A                    destPre1 += srcFile.getName();//%E6%A0%B9%E6%8D%AE%E5%AE%9E%E9%99%85%E6%96%87%E4%BB%B6%E5%90%8D%E5%88%9B%E5%BB%BA%E7%9B%AE%E5%BD%95%0A                %7D%0A                copyFiles(srcFile.getPath(), destPre1, needDelete);// %E9%80%92%E5%BD%92%E5%A4%8D%E5%88%B6%0A            %7D%0A        %7D else %7B%0A            System.out.println(src + %22  %22 + dest);%0A%0A            InputStream in = new FileInputStream(src);%0A            OutputStream out = new FileOutputStream(dest);%0A%0A            byte%5B%5D buffer = new byte%5B1024%5D;%0A            int length;%0A            while ((length = in.read(buffer)) %3E 0) %7B%0A                out.write(buffer, 0, length);%0A            %7D%0A            in.close();%0A            out.close();%0A%0A            if(needDelete) %7B//%E5%88%A4%E6%96%AD%E6%98%AF%E5%90%A6%E9%9C%80%E8%A6%81%E5%88%A0%E9%99%A4%E6%BA%90%E6%96%87%E4%BB%B6%0A                src.delete();%0A            %7D%0A        %7D%0A    %7D%0A%0A    public static void main(String%5B%5D args) %7B%0A        try %7B%0A            copyFiles(args%5B0%5D, args%5B1%5D, Boolean.parseBoolean(args%5B2%5D));%0A            //copyFiles(%22C:/data_src/%22, %22C:/data_now/%22, false);%0A        %7D catch (IOException e) %7B%0A            e.printStackTrace();%0A        %7D%0A    %7D%0A%0A%7D%0A

add support for FileCrawler