/// <summary>查找本地文件</summary>
        public void FindLocalFile(string filePath)
        {
            DirectoryInfo parentdi = new DirectoryInfo(filePath);
            //不是目录 
            if (parentdi == null) return;
            //路径不存在
            if (!Directory.Exists(filePath)) return;

            foreach (FileSystemInfo Fileinfo in parentdi.GetFileSystemInfos())
            {
                FileInfo file = Fileinfo as FileInfo;
                //是文件 
                if (file != null)
                {
                    FtpFileInfo ffi = new FtpFileInfo();
                    ffi.IsDirectory = false;
                    ffi.FileName = file.Name;
                    ffi.FileFullName = file.FullName;
                    lstLocalfile.Add(ffi);
                }
                //对于子目录,进行递归调用 
                else
                    FindLocalFile(Fileinfo.FullName);

            }

        }
        //查找ftp文件夹中的文件
        public List<FtpFileInfo> GetFilesListByForder(string serverPath)
        {
            List<FtpFileInfo> lstfileName = new List<FtpFileInfo>();
            StreamReader sr = null;
            //Uri uri = new Uri("ftp://" + ftpServer + "/" + serverPath);

            Uri uri = null;
            if (serverPath != "")
                uri = new Uri(serverPath);
            else
                uri = new Uri("ftp://" + ftpServer + "/");

            try
            {
                ftpRequest = (FtpWebRequest)FtpWebRequest.Create(uri);
                if (ftpRequest == null) throw new Exception("无法打开ftp服务器连接");
                ftpRequest.Method = WebRequestMethods.Ftp.ListDirectoryDetails;   //列表   

                if (!IsAnonymous)
                {
                    ftpRequest.Credentials = new NetworkCredential(userName, password);
                }

                sr = new StreamReader(ftpRequest.GetResponse().GetResponseStream());
                while (!sr.EndOfStream)//读取列表
                {

                    char[] splitChar = { ' ' };
                    string temp = sr.ReadLine();
                    string[] tmpArray = temp.Split(splitChar, StringSplitOptions.RemoveEmptyEntries);

                    if (tmpArray.Length != 9)
                    {
                        continue;
                    }
                    FtpFileInfo ffi = new FtpFileInfo();
                    ffi.IsDirectory = tmpArray[0].StartsWith("d");
                    string tempName= tmpArray[8].Replace(".","");
                    if(string.IsNullOrEmpty(tempName)) continue;

                    ffi.FileName = tmpArray[8];
                    if (serverPath != "")
                        ffi.FileFullName = serverPath + "/" + tmpArray[8];
                    else
                        ffi.FileFullName = "ftp://" + ftpServer + "/" +  tmpArray[8];
                    lstfileName.Add(ffi);
                }
            }
            catch (Exception ex)
            {
                //TODO: 异常处理.
                throw ex;
            }
            finally
            {
                if (sr != null) sr.Close();
            }
            return lstfileName;
        }