zoukankan      html  css  js  c++  java
  • .NET中完成FTP各功能操作

    1.FTP工厂类
    using System;
    using System.Configuration;
    using System.IO;
    using System.Net;
    using System.Net.Sockets;
    using System.Text;
    using System.Threading;

    namespace School.Common
    {
        
    /// <summary>
        
    /// 类 编 号: 0043
        
    /// 类 名 称: FTPFactory 
        
    /// 内容摘要: FTP工厂,完成FTP各功能操作
        
    /// 完成日期: 2007-1-12 10:38:36
        
    /// 编码作者: 林付国
        
    /// </summary>

        public class FTPFactory
        
    {
            
    成员变量

            
    构造方法

            
    基本信息设置

            
    属性

            
    功能操作

            
    信息输出方法
        }

    }

    2.调用方法
     // 检查此FTP是否可用
                        FTPFactory ftp = new FTPFactory();
                        ftp.setRemoteHost(主机名);
                        ftp.setRemoteUser(用户名);
                        ftp.setRemotePass(密码);
                        ftp.setRemotePort(端口);
                        ftp.setRemotePath(路径);

                        ftp.login();

                        if (!ftp.GetLogin)
                        {
                  // 提示连接失败
                            this.Cursor = Cursors.Default;
                            return;
                        }
                        ftp.close();
  • 相关阅读:
    Apple MDM
    苹果核
    iOS自动化测试的那些干货
    Wifi 定位原理及 iOS Wifi 列表获取
    详解Shell脚本实现iOS自动化编译打包提交
    PushKit 占坑
    【译】使用 CocoaPods 模块化iOS应用
    NSMutableArray 根据key排序
    iOS 通过tag查找控件
    自己使用 2.常量变量,数据类型,数据的输入输出。
  • 原文地址:https://www.cnblogs.com/linfuguo/p/716828.html
Copyright © 2011-2022 走看看