hcwzwx 发表于 2015-5-26 12:44:46

使用FTP组件实现程序自动更新

using System;
using EnterpriseDT.Net.Ftp;

namespace HzyModule
{
    public class PragrammerUpdate
    {
      FTPClient FTPDownloadClient;
      public void Update(string LocalPath,FTPClient FTPclient)
      {
            FTPDownloadClient=FTPclient;
            update (LocalPath);
      }
      private void update(string local)
      {
            if (!System.IO.Directory .Exists (local)) System.IO .Directory .CreateDirectory (local);
            FTPFile[] RemoteFiles;

            string[] filename=FTPDownloadClient.Dir ();
            RemoteFiles=FTPDownloadClient.DirDetails("*.*");
            int filenumbers=RemoteFiles.Length ;
            string FileDirectoryName=null;
            for (int i=0;i
页: [1]
查看完整版本: 使用FTP组件实现程序自动更新