晚辈最近用C#写了一个教育网FTP搜索引擎,希望能得到高手的指点。
网址:http://soso.ccnu.com.cn http://it.ccnu.edu.cn/soso
部分代码:
using System;
using softplib;
using System.Threading;
using System.Collections;
using System.Net;
using System.Net.Sockets;
using System.IO;
using System.Data;
using System.Runtime.Serialization;
using System.Runtime.Serialization.Formatters.Binary;
namespace spider
{
/// <summary>
/// IndexClass 的摘要说明。
/// </summary>
//编制索引类
class IndexClass
{
private IPAddress ip;
private string name;
private SqlProcedure sp;
public IndexClass(IPAddress _ip,string _name)
{
ip=_ip;
name=_name;
}
public void createIndex()
{
FTPFactory ff = new FTPFactory();
ff.setDebug(false);
string header="ftp://"+ip.ToString();
string address=name;
try
{
ff.setRemoteHost(ip.ToString());
ff.login();
Queue q=new Queue();
ArrayList fileNames=ff.getFileList("*.*");
ArrayList subdirNames=ff.getSubdir
| 对此文章发表了评论 |

